I am not able to get my JFileChooser
to look like the Windows 7 file chooser dialog. I'm using Java 7.
What I want:
What I get:
My app sets the look and feel in the main
method before opening any Swing windows:
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
I tried manually assigning a Windows look and feel class to the JFileChooser with no success:
JFileChooser fileChooser = new JFileChooser();
WindowsFileChooserUI wui = new WindowsFileChooserUI(fileChooser);
wui.installUI(fileChooser);
I've also tried setting the look and feel via a system property at the command line, but that didn't help either.
-Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Any ideas? Thanks.