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() |
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) |