Thu Jul 30, 2009 4:46 pm
buttonGroup1.getSelection().getClass().getName()
Fri Jul 31, 2009 1:03 pm
buttonGroup.getSelection().getSelectedObjects()
orderButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
String entree = buttonGroup.getSelection().getActionCommand();
System.out.println(entree + " sandwich");
Component[] components = condimentsPanel.getComponents();
for (Component c : components) {
JCheckBox cb = (JCheckBox) c;
if (cb.isSelected())
System.out.println("With " + cb.getText());
}
}
});
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.