miteshn
asked on
JComboBox after JPanel.repaint
Hi,
I have a JPanel(parent) on which I am GridLayout. In my JPanel, I have two panels(child1,child2) added. Both these panels have a ComboBox. The actionListener causes the bigger panel to be repainted. Now, when if my child1.ComboBox has some item selected, how do I show it in the JComboBox next to the arrow. After a repaint, I am getting a default value at the combo boxes.
I have a JPanel(parent) on which I am GridLayout. In my JPanel, I have two panels(child1,child2) added. Both these panels have a ComboBox. The actionListener causes the bigger panel to be repainted. Now, when if my child1.ComboBox has some item selected, how do I show it in the JComboBox next to the arrow. After a repaint, I am getting a default value at the combo boxes.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i actually figured it out...first, remove the actionListeners, and then setSelectedItem. then add actionListeners again...
Sorry for less of answer. In my country it was deep night. :-)
ASKER
thanks