Thread View: comp.lang.java.programmer
1 messages
1 total messages
Started by aag
Sun, 12 Nov 2000 00:00
bug in Event class under IE
Author: aag
Date: Sun, 12 Nov 2000 00:00
Date: Sun, 12 Nov 2000 00:00
49 lines
2185 bytes
2185 bytes
hello all,
I am required to maintain some java code using the Event class and I have
noticed that, under Internet Explorere (v5 & 5.5 at least), the TAB key does
NOT register a KEY_PRESSED notice for the TextArea class. It, of course, works
as expected under Netscape.
Is this a known bug or am I doing something wrong? Any help would be
appreciated.
trying the following code results in KEY_RELEASE notices but no KEY_PRESSED
notices under IE when TAB key is hit.
import java.awt.*;
public class TestTextArea extends TextArea
{
public TestTextArea(String s)
{
super(s);
}
public boolean handleEvent(Event event)
{
if (event.id == Event.ACTION_EVENT)
System.out.println("ACTION_EVENT");
else if (event.id == Event.KEY_PRESS)
System.out.println("KEY_PRESS [key: "+event.key+"]");
else if (event.id == Event.KEY_RELEASE)
System.out.println("KEY_RELEASE [key: "+event.key+"]");
else if (event.id == Event.KEY_ACTION)
System.out.println("KEY_ACTION");
else if (event.id == Event.KEY_ACTION_RELEASE)
System.out.println("ACTION_RELEASE");
else if (event.id == Event.LOST_FOCUS)
System.out.println("LOST_FOCUS");
else if (event.id == Event.GOT_FOCUS)
System.out.println("GOT_FOCUS");
else
System.out.println("UNKNOWN Action");
return (super.handleEvent(event));
}
}
Any help would be appreciated.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads