views:

36

answers:

2

I'm using substance look and feel as my application default look and feel, however I want to set the system look and feel for FileDialog especially in Mac OS. Is it possible to set FileDialog to use look and feel other than the application look and feel?

Thanks

+2  A: 

java.awt.FileDialog is not a Swing component, so it doesn't have a UI delegate to change. Although some prefer the former on Mac OS X, consider javax.swing.JFileChooser as an alternative.

trashgod
+1  A: 

The LAF of a component is determined when a component is created. So you can try using:

a) set the LAF b) create and instance of the component c) restore the LAF to your default LAF

Some people have recommended against this approach suggesting that all components should be of the same LAF and there may be some unexpected problems when you try to mix LAF's. I'll let you be the judge if this will work for you or not.

camickr
doesn't this have any performance problems?
Feras
I don't know what problems it may have, I've never tried it.
camickr