Meaningless Drivel is fun!
The moose likes Swing / AWT / SWT and the fly likes JFileChooser lookandfeel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFileChooser lookandfeel" Watch "JFileChooser lookandfeel" New topic
Author

JFileChooser lookandfeel

Matti Poro
Ranch Hand

Joined: Dec 03, 2005
Posts: 41
I have a program that uses MetalLookAndFeel but JFileChooser doesn't look so nice with that lookandfeel. I wonder if it is possible to make JFileChooser have the native lookandfeel.
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
You could use an AWT FileDialog instead. That should be closer to the native LAF.
Matti Poro
Ranch Hand

Joined: Dec 03, 2005
Posts: 41
Thank you. It looks perfect.
Casper Maxwell
Ranch Hand

Joined: Aug 04, 2005
Posts: 88
In my experience if you do not apply look-and-feel separately to JFileChooser, you see initial LF. So i think you can apply a different LF to your JFileChooser. An example code is in the url below if you need (you need to call SwingUtilities.updateComponentTreeUI(..) only on JFileChooser):

How to change the look and feel of Swing applications
http://www.java-tips.org/content/view/762/2/
 
Have you checked out Aspose?
 
subject: JFileChooser lookandfeel
 
jQuery in Action, 3rd edition