From:  user@domain.invalid
Date:  07 Oct 2003 02:15:36 Hong Kong Time
Newsgroup:  news.mozilla.org/netscape.public.mozilla.oji
Subject:  

java choice menu select method throws action event in OJI plugin

NNTP-Posting-Host:  apollo.pmel.noaa.gov

  I've got a moderately complex java applet written at the version 1.0 
level (and compiled with javac 1.1) which uses several choice menus and 
often uses the select("value") method to change the menu items shown. 
This applet runs fine in all browsers except mozilla on redhat 8, in 
which I get an infinite loop of choice menu action events, and I've 
identified the cause as the select method causing an action event, as 
though the user had made a selection in the browser gui, rather than the 
applet software doing this internally. On all other platforms and 
browsers that I've tried, the select method doesn't cause an action 
event, and user gui selections are thus distinguished from internal 
applet choice menu changes via the select method.

I'm trying to program around this, and would be interested to know if 
anybody can recommend a way to prevent this event from being triggered 
by the select method and/or some way to squelch it. I don't see a way to 
prevent it except by

panel.removeAll();
choice_object.select("value");
add_menus_back(panel);

which causes a lot of flickering and flashing of the menus, but does 
succeed in preventing select from triggering an action event. I also 
tried temporarily setting choice objects to null, but action events are 
triggered when the choice objects are repainted in the panel.

A more elegant solution would be much appreciated! Thanks for any help 
on this.