/[classpath]/classpath/examples/gnu/classpath/examples/swing/Demo.java
ViewVC logotype

Diff of /classpath/examples/gnu/classpath/examples/swing/Demo.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.24 by rabbit78, Tue Oct 25 15:13:56 2005 UTC revision 1.25 by mark, Sun Oct 30 22:43:30 2005 UTC
# Line 42  public class Demo Line 42  public class Demo
42        {        {
43          if (System.getProperty("swing.defaultlaf") == null)          if (System.getProperty("swing.defaultlaf") == null)
44            {            {
45                UIManager.setLookAndFeel(new GNULookAndFeel());
46    
47              StringBuffer text = new StringBuffer();              StringBuffer text = new StringBuffer();
48              text.append("\tYou may change the Look and Feel of this\n");              text.append("You may change the Look and Feel of this\n");
49              text.append("\tDemo by setting the system property\n");              text.append("Demo by setting the system property\n");
50              text.append("\t-Dswing.defaultlaf=<LAFClassName>\n\n");              text.append("-Dswing.defaultlaf=<LAFClassName>\n");
51              text.append("\tPossible values for <LAFClassName> are:\n");              text.append("\n");
52              text.append("\t  * javax.swing.plaf.metal.MetalLookAndFeel\n");              text.append("Possible values for <LAFClassName> are:\n");
53              text.append("\t\tthe default Java L&F\n");              text.append("\n");
54              text.append("\t  * gnu.classpath.examples.swing.GNULookAndFeel\n");              text.append("* javax.swing.plaf.metal.MetalLookAndFeel\n");
55              text.append("\tthe GNU Look and Feel\n");              text.append("  the default GNU Classpath L&F\n");
56              text.append("\t(derived from javax.swing.plaf.basic.BasicLookAndFeel\n\n");              text.append("\n");
57              text.append("\tthe default is gnu.classpath.examples.swing.GNULookAndFeel\n");              text.append("* gnu.classpath.examples.swing.GNULookAndFeel\n");
58                text.append("  the GNU Look and Feel\n");
59                text.append("  (derived from javax.swing.plaf.basic.BasicLookAndFeel)\n");
60                text.append("\n");
61                text.append("the default is gnu.classpath.examples.swing.GNULookAndFeel\n");
62              JEditorPane textPane = new JEditorPane();              JEditorPane textPane = new JEditorPane();
63              // temporary hack, preferred size should be computed by the              // temporary hack, preferred size should be computed by the
64              // component              // component
# Line 61  public class Demo Line 67  public class Demo
67              JOptionPane.showMessageDialog(null, textPane,              JOptionPane.showMessageDialog(null, textPane,
68                                            "Look and Feel notice",                                            "Look and Feel notice",
69                                            JOptionPane.INFORMATION_MESSAGE);                                            JOptionPane.INFORMATION_MESSAGE);
               
             UIManager.setLookAndFeel(new GNULookAndFeel());  
70            }            }
71        }        }
72      catch (UnsupportedLookAndFeelException e)      catch (UnsupportedLookAndFeelException e)

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26