/*
NOTE: By default, the look and feel will be set to the
Cross Platform Look and Feel (which is currently Metal).
The user may someday be able to override the default
via a system property. If you as the developer want to
be sure that a particular L&F is set, you can do so
by calling UIManager.setLookAndFeel(). For example, the
first code snippet below forcibly sets the UI to be the
System Look and Feel. The second code snippet forcibly
sets the look and feel to the Cross Platform L&F.
Snippet 1:
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception exc) {
System.err.println("Error loading L&F: " + exc);
}
Snippet 2:
try {
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
} catch (Exception exc) {
System.err.println("Error loading L&F: " + exc);
}
*/
SimpleExample panel = new SimpleExample();
frame = new JFrame("SimpleExample");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {System.exit(0);}
});
frame.getContentPane().add("Center", panel);
frame.pack();
frame.setVisible(true);
panel.updateState();