/[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.1.2.1 by gnu_andrew, Thu Jan 13 22:40:37 2005 UTC revision 1.1.2.2 by gnu_andrew, Fri Jan 14 10:24:03 2005 UTC
# Line 550  public class Demo Line 550  public class Demo
550      return tabs;      return tabs;
551    }    }
552    
553      public static JComboBox mkComboBox(String[] names)
554      {
555        JComboBox box = new JComboBox(names);
556        return box;
557      }
558    
559    public static JSpinner mkSpinner()    public static JSpinner mkSpinner()
560    {    {
561      JSpinner spinner = new JSpinner();      JSpinner spinner = new JSpinner();
# Line 669  public class Demo Line 675  public class Demo
675      return close;      return close;
676    }    }
677    
678      public static JColorChooser mkColorChooser()
679      {
680        return new JColorChooser();
681      }
682    
683    private static class PopUpAction    private static class PopUpAction
684      implements ActionListener      implements ActionListener
685    {    {
# Line 754  public class Demo Line 765  public class Demo
765                      mkSpinner(),                      mkSpinner(),
766                      panel);                      panel);
767    
768        new PopUpAction("TextField",
769                        mkTextField("Hello, World!"),
770                        panel);
771    
772        new PopUpAction("ColorChooser",
773                        mkColorChooser(),
774                        panel);
775    
776        new PopUpAction("ComboBox",
777                        mkComboBox(new String[] {"Stop",
778                                                 "Software",
779                                                 "Hoarders",
780                                                 "Support",
781                                                 "GNU!"}),
782                        panel);
783    
784      JButton exitDisposer = mkDisposerButton(frame);      JButton exitDisposer = mkDisposerButton(frame);
785      panel.add(exitDisposer);      panel.add(exitDisposer);
786    
787      return panel;      return panel;
788    }    }
789    
790      public static JTextField mkTextField(String sometext)
791      {
792        return new JTextField(sometext, 40);
793      }
794  }  }

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

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