Dear Everyone,
I am using some really neat code to listen to a group of JComboBoxes.
The four JComboBoxes in question sit on a JFrame and each of the boxes presents the program user with ten numberical choices, namely 0-9.
The Listener method for one of the JComboBoxes, named Millennia is shown below:
Millennia.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent e){
Millenniaxx = Millennia.getSelectedIndex();
}});
If anybody can explain to me what the above code does it would be greatly appreciated.
Thanks
I am using some really neat code to listen to a group of JComboBoxes.
The four JComboBoxes in question sit on a JFrame and each of the boxes presents the program user with ten numberical choices, namely 0-9.
The Listener method for one of the JComboBoxes, named Millennia is shown below:
Millennia.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent e){
Millenniaxx = Millennia.getSelectedIndex();
}});
If anybody can explain to me what the above code does it would be greatly appreciated.
Thanks