File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes System or User Defined LookAndFeel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "System or User Defined LookAndFeel" Watch "System or User Defined LookAndFeel" New topic

System or User Defined LookAndFeel

Tim Koop

Joined: Jun 23, 2005
Posts: 8
Hi everyone.

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:

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 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?

Thanks in advance.

Tim Koop
jQuery in Action, 3rd edition
subject: System or User Defined LookAndFeel
It's not a secret anymore!