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

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

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

revision 1.1 by trebligd, Fri Sep 16 09:36:30 2005 UTC revision 1.2 by trebligd, Thu Sep 29 22:15:21 2005 UTC
# Line 81  public class ButtonDemo Line 81  public class ButtonDemo
81                
82    private JPanel createContent()    private JPanel createContent()
83    {    {
84        JPanel content = new JPanel(new BorderLayout());
85      JPanel panel = new JPanel(new GridLayout(4, 1));      JPanel panel = new JPanel(new GridLayout(4, 1));
86      panel.add(createButtonPanel());      panel.add(createButtonPanel());
87      panel.add(createTogglePanel());      panel.add(createTogglePanel());
88      panel.add(createCheckBoxPanel());      panel.add(createCheckBoxPanel());
89      panel.add(createRadioPanel());      panel.add(createRadioPanel());
90      return panel;              content.add(panel);
91        JPanel closePanel = new JPanel();
92        JButton closeButton = new JButton("Close");
93        closeButton.setActionCommand("CLOSE");
94        closeButton.addActionListener(this);
95        closePanel.add(closeButton);
96        content.add(closePanel, BorderLayout.SOUTH);
97        return content;        
98    }    }
99            
100    private JPanel createButtonPanel()    private JPanel createButtonPanel()
# Line 252  public class ButtonDemo Line 260  public class ButtonDemo
260        radio2.setEnabled(radioState.isSelected());        radio2.setEnabled(radioState.isSelected());
261        radio3.setEnabled(radioState.isSelected());        radio3.setEnabled(radioState.isSelected());
262      }      }
263        else if (e.getActionCommand().equals("CLOSE"))
264        {
265          System.exit(0);
266        }
267    }    }
268    
269    public static void main(String[] args)    public static void main(String[] args)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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