use of javax.swing.plaf.metal.MetalLookAndFeel in project jdk8u_jdk by JetBrains.
the class Test4783068 method test.
void test() {
try {
UIManager.setLookAndFeel(new MetalLookAndFeel());
} catch (UnsupportedLookAndFeelException e) {
throw new Error("Cannot set Metal LAF");
}
// Render text using background color
UIManager.put("textInactiveText", TEST_COLOR);
test(new JLabel(html));
test(new JButton(html));
JEditorPane pane = new JEditorPane("text/html", html);
pane.setDisabledTextColor(TEST_COLOR);
test(pane);
}
use of javax.swing.plaf.metal.MetalLookAndFeel 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));
}
});
}
use of javax.swing.plaf.metal.MetalLookAndFeel in project jdk8u_jdk by JetBrains.
the class bug6559589 method main.
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new MetalLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
bug6559589.createGui();
}
});
}
Aggregations