Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #5460
| From | Knute Johnson <nospam@rabbitbrush.frazmtn.com> |
|---|---|
| Newsgroups | comp.lang.java.gui |
| Subject | LookAndFeel on Windows 8? |
| Date | 2015-03-02 10:18 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <md29f1$vff$1@dont-email.me> (permalink) |
I'm having a problem getting my JFrame to change LookAndFeel. No matter
what I set it to the outside of the frame always looks the same. If I
change the LAF to Motif the color of the inside of the frame changes but
not the frame decorations themselves. Windows 8.1, Java 8u31.
Any ideas?
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
public class test {
static Map<String,String> map = new HashMap<>();
public static void main(String... args) {
for (UIManager.LookAndFeelInfo info :
UIManager.getInstalledLookAndFeels()) {
map.put(info.getName(),info.getClassName());
System.out.println(info.getName());
}
EventQueue.invokeLater(() -> {
try {
UIManager.setLookAndFeel(map.get("Nimbus"));
} catch (Exception e) {
e.printStackTrace();
}
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
f.setSize(400,300);
f.setVisible(true);
});
}
}
--
Knute Johnson
Back to comp.lang.java.gui | Previous | Next — Next in thread | Find similar
LookAndFeel on Windows 8? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2015-03-02 10:18 -0800
Re: LookAndFeel on Windows 8? FredK <fred.l.kleinschmidt@gmail.com> - 2015-03-03 10:09 -0800
Re: LookAndFeel on Windows 8? Joerg Meier <joergmmeier@arcor.de> - 2015-03-03 19:33 +0100
Re: LookAndFeel on Windows 8? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2015-03-03 16:29 -0800
csiph-web