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

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

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

revision 1.4 by rabbit78, Tue Oct 25 15:13:56 2005 UTC revision 1.5 by trebligd, Sat Oct 29 05:04:23 2005 UTC
# Line 101  public class ComboBoxDemo Line 101  public class ComboBoxDemo
101    public ComboBoxDemo(String title)    public ComboBoxDemo(String title)
102    {    {
103      super(title);      super(title);
104      getContentPane().add(createContent());      JPanel content = createContent();
105        JPanel closePanel = new JPanel();
106        JButton closeButton = new JButton("Close");
107        closeButton.setActionCommand("CLOSE");
108        closeButton.addActionListener(this);
109        closePanel.add(closeButton);
110        content.add(closePanel, BorderLayout.SOUTH);
111        getContentPane().add(content);
112    }    }
113                
114      /**
115       * Returns a panel with the demo content.  The panel
116       * uses a BorderLayout(), and the BorderLayout.SOUTH area
117       * is empty, to allow callers to add controls to the
118       * bottom of the panel if they want to (a close button is
119       * added if this demo is being run as a standalone demo).
120       */      
121    JPanel createContent()    JPanel createContent()
122    {    {
123      JPanel content = new JPanel(new BorderLayout());      JPanel content = new JPanel(new BorderLayout());
# Line 115  public class ComboBoxDemo Line 129  public class ComboBoxDemo
129      panel.add(createPanel5());      panel.add(createPanel5());
130      panel.add(createPanel6());      panel.add(createPanel6());
131      content.add(panel);      content.add(panel);
     JPanel closePanel = new JPanel();  
     JButton closeButton = new JButton("Close");  
     closeButton.setActionCommand("CLOSE");  
     closeButton.addActionListener(this);  
     closePanel.add(closeButton);  
     content.add(closePanel, BorderLayout.SOUTH);  
132      return content;              return content;        
133    }    }
134            

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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