While design, i am getting some problem related to JComboBox Listener.
In my class i have defined two combo box objects and in the fisrt combo box there are some values populating. When i select the item from first comboo box the corresponding value to the item selected are populating in the second combo box. However when selected the item in the second combo box the necessary action is not performing.
When i select the item in the first combo box, the action which needs to perform in case of item selection of second combo box is performing along with the action needs to perform for the item selected in the first combo box.
I have added actionListener for the two combo boxes and doing implemented the action performed method.
If you have added the ActionListeners properly everything should just work.
comboBox1.addActionListener(new AbstractAction(){
publicvoid actionPerformed(ActionEvent evt) {
// do stuff - perhaps use JOPtionPane to help debug
}
});
comboBox2.addActionListener(new AbstractAction(){
publicvoid actionPerformed(ActionEvent evt) {
// do stuff - debug with JOptionPane also
}
});