posted 22 years ago
Verduka,
i have run into the same problem before and there are two solutions i found.
One was to add an ActionListener to the jcombobox instead of a itemlistener, which created the result of firing off only 1 event every time something was selected(or reselected) in the comboboxlist.
the second was to use:
if (event.getStateChange() == ItemEvent.SELECTED)
{
...
}
in the itemStateChanged() method.
in this case, this code gets run once ONLY when the selected item actually changes.
[ February 03, 2002: Message edited by: Takeshi Toyohara ]