There seems to be a rather annoying bug in the blackdown JVM for linux
regarding java.awt.Choice components.  If you run the code below (a frame
with 2 components, a textarea and a Choice), type something in the text box
(just to prove it works to start with), make a selection from the Choice,
now the text will still work. Now make one more selection from the Choice.
Now nothing gets focus. You can't tab, or select with the mouse.  However
Buttons, Menus, Lists, etc still work with mouse events.  But no keyboard
events work becuase nothing has focus to receive them.

I have now only found two mentions of this problem in several days of
searching.  One is a note on the blackdown jitterBug reporting system.  The
other is a message posted to this list July 99 (That's where the example
code below came from, thanks Nelson Minar and Tucker Sylvestro).  Neither
have a response.  I've confirmed it in Blackdown JDK 1.1.7_v3, 1.2pre2,
1.1.8_v1. And in the exact same situation Netscape for Linux works fine.
I'm downloading the IBM jdk right now and if it works I just might abandon
blackdown if I can't find a workaround.

Thanks for your time.


                 ~blake

>>
>>
>>        /** Demonstration of a bug in focus with the AWT on Linux and Java.
>>         **
>>         ** Creates a Frame with a Choice and a TextArea. Every other
>>time the
>>         ** Choice box is selected, the text area loses the ability to take
>>         ** focus. To demonstrate this, type some text into the text area,
>>         ** then select something from the Choice. Type into the text area
>>         ** again, then select something from the Choice again. The text area
>>         ** is now locked, and cannot be typed into.
>>         **
>>         ** Removing focus and restoring it to the Java app allows the text
>>         ** area to be used again, but it re-locks every second time the
>>         ** Choice is selected.
>>         **
>>         ** Bug verified with WindowMaker and fvwm2,
>>         ** Blackdown JDK 1.1.7_v3 and 1.2_pre2
>>         **
>>         ** Nelson Minar <[EMAIL PROTECTED]>
>>         ** and Tucker Sylvestro <[EMAIL PROTECTED]>
>>         ** Mon Jul 19 18:51:14 EDT 1999
>>         **/
>>
>>        import java.awt.*;
>>
>>        public class FocusBug extends Frame {
>>            Choice c = null;
>>            TextArea t = null;
>>
>>            public FocusBug() {
>>                c = new Choice();
>>                c.addItem("Item 1");
>>                c.addItem("Item 2");
>>                add(c);
>>
>>                t = new TextArea();
>>                t.setEditable(true);
>>                add(t);
>>
>>                pack();
>>                setVisible(true);
>>            }
>>
>>            public static void main(String args[]) {
>>                Test f = new Test();
>>                f.setLayout(new FlowLayout());
>>            }
>>        }
>>
>>
>>                                                      [EMAIL PROTECTED]
>> .       .      .     .    .   .  . . http://www.media.mit.edu/~nelson/
>>
>> - --M6etIGscyw--
>>
>



----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to