BUG: NullPointerException in DialogLayout ConstructorLast reviewed: January 29, 1998Article ID: Q167942 |
The information in this article applies to:
SYMPTOMSWhen you try to call your Dialog class constructor and CreateControls() in a Frame Class constructor, the following error appears:
Java.lang.NullPointerException. CAUSEThe font for the frame has not been initialized.
RESOLUTIONTo workaround the problem create a font object prior to the call to the Dialog box constructor. For example:
import java.awt.*; import NewDialog; class MyFrame extends Frame { NewDialog dlg = null; public MyFrame() { setFont( new Font( "Dialog", Font.PLAIN, 16)); dlg = new NewDialog(this); dlg.CreateControls(); } } STATUSMicrosoft 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
REFERENCESFor the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, see the following page on the Microsoft Technical Support site:
http://support.microsoft.com/support/visualj/ http://support.microsoft.com/support/java/ |
Additional query words: NullPointerException java
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |