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

  1. Save this class to a file named Tabtest.java:


  2. 
          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();
             }
          } 
  3. Compile the file.


  4. Run the class using this command:


  5. 
       jview Tabtest 
  6. 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


Last Reviewed: August 27, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.