BUG: NullPointerException When Tabbing Inside a Dialog Box
ID: Q184601
|
The information in this article applies to:
-
Microsoft Win32 Virtual Machine
SYMPTOMS
Attempting to TAB inside a dialog box, created by a Java application,
causes the following exception:
"Exception occurred during event dispatching
java.lang.NullPointerException at ...."
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this bug and will post
new information here in the Microsoft Knowledge Base as it becomes
available.
MORE INFORMATION
Steps to Reproduce Behavior
- Save this class to a file named Tabtest.java:
import java.awt.*;
public class Tabtest
{
public static void main (String argv[])
{
Frame frame = new Frame();
frame.setSize(200, 200);
frame.setVisible(true);
frame.setLayout(new FlowLayout());
Dialog d = new Dialog(frame, true);
d.setSize(100,100);
Component item;
d.add(item = new Label("Tab inside this dialog"),"North");
item.requestFocus();
d.show();
}
}
- Compile the file.
- Run the class using this command:
jview Tabtest
- Press the TAB key when focus in inside the dialog box.
The nullPointerException exception that is generated.
NOTE: The same problem happens with AFC's UIDialog component.
Additional query words:
dialog focus tab NullPointerException
Keywords : AWTPkg
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbbug