Search in sources :

Example 1 with MetalFileChooserUI

use of javax.swing.plaf.metal.MetalFileChooserUI in project jdk8u_jdk by JetBrains.

the class bug6342301 method main.

public static void main(String[] args) throws Exception {
    tempDir = System.getProperty("java.io.tmpdir");
    if (tempDir.length() == 0) {
        //'java.io.tmpdir' isn't guaranteed to be defined
        tempDir = System.getProperty("user.home");
    }
    System.out.println("Temp directory: " + tempDir);
    UIManager.setLookAndFeel(new MetalLookAndFeel());
    SwingUtilities.invokeAndWait(new Runnable() {

        public void run() {
            HackedFileChooser openChooser = new HackedFileChooser();
            openChooser.setUI(new MetalFileChooserUI(openChooser));
            openChooser.setCurrentDirectory(new File(tempDir));
        }
    });
}
Also used : MetalFileChooserUI(javax.swing.plaf.metal.MetalFileChooserUI) MetalLookAndFeel(javax.swing.plaf.metal.MetalLookAndFeel) File(java.io.File)

Aggregations

File (java.io.File)1 MetalFileChooserUI (javax.swing.plaf.metal.MetalFileChooserUI)1 MetalLookAndFeel (javax.swing.plaf.metal.MetalLookAndFeel)1