• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

System or User Defined LookAndFeel

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
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?

Thanks in advance.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic