Java Swing and JComboBox Events -


I have a JComboBox with multiple values ​​I know that when user JComboBox < / Code>, but does not change the currently selected item, it needs to be able to know.

Neither itemStateChanged nor actionPerformed

P> How to compare the status of the combo box when it is pressed with the mouse button, and compare it to the value issued by the mouse button
  • < Code> JComboBox <
  • Override to record the state of the box in a temporary variable
  • Override the value of the box to the value of the temporary variable < / Ul>

    At this point, this is a simple formula Anta investigation.

Comments