Hi,
I'm working on a multi-player game using RMI, and I've encountered an odd
problem that I don't believe is the result of silliness on my part.
I have a Choice object where players choose their character. If another
player picks a character, I'd like to remove that item from the Choice for
all the other players (can't have more than one player using the same
character!). I do this, basically:
Choice c = new Choice();
c.add("Choice one");
c.add("Choice two");
c.add("Choice three");
then later...
c.remove(0);
After an item has been removed, trying to choose a different item (esp.
the last item) causes:
java.lang.IllegalArgumentException: illegal Choice item position: 2
at java.awt.Choice.select(Choice.java:298)
at sun.awt.motif.MChoicePeer.action(MChoicePeer.java:86)
at java.lang.Thread.run(Thread.java)
I've just upgraded to jdk1.1.6v2 (I was running 1.1.3 and thought that
might have been fixed in 1.1.6). It would be easy enough to hack out a
solution, but this same code segment works on NT.
Thanks,
dstn.
---------------------------------
Dustin Lang, [EMAIL PROTECTED]