BUG: NullPointerException in DialogLayout Constructor (167942)
The information in this article applies to:
- Microsoft Visual J++ 1.0
- Microsoft Visual J++ 1.1
This article was previously published under Q167942 SYMPTOMS
When you try to call your Dialog class constructor and CreateControls() in
a Frame Class constructor, the following error appears:
Java.lang.NullPointerException.
CAUSE
The font for the frame has not been initialized.
RESOLUTION
To 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();
}
}
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.
REFERENCES
For the latest Knowledge Base articles and other support information on
Visual J++ and the SDK for Java, see the following pages on the Microsoft
Technical Support site:
Modification Type: | Minor | Last Reviewed: | 8/25/2005 |
---|
Keywords: | kbArtTypeINF kbbug kbwizard KB167942 |
---|
|