This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a swing application, and I want it to look like the System's look and feel, so I have this line at the begining: UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
However, I also want the user to be able to pick his/her favourite other look and feel if it is different, such as with a -D in the command or a setting in the swing.properties file. The only problem is that if nothing is defined, it defaults to swing Metal, which doesn't look as good as anything else.
Does anyone know a good way to allow the user to pick any LookAndFeel, but still set it to be the SystemLookAndFeel if nothing else is explicitly chosen?