J
Joakim G.
Hi all,
Occasionally my Applet gives me just a blank window and an
error message in the IE java console when it is about to start.
I'm running IE 6.0 and Microsoft's own JVM.
My Applet init code is very simple:
nl = System.getProperty("line.separator");
textArea = new TextArea(null, 20, 40,
TextArea.SCROLLBARS_VERTICAL_ONLY);
textArea.setEditable(false);
setLayout(new BorderLayout(1, 1));
add("Center", textArea);
mainThread = new Thread(this);
mainThread.start();
The mainThread just do a:
textArea.setText(nl+nl+"Console messages will be shown below:"+nl);
and some calls to:
public static void consolePrint(TextArea ta, String message, String nl) {
String timeStamp = new Date().toLocaleString();
ta.append("=== "+timeStamp+nl+message+nl+nl);
}
The error I get in the Java console when the Applet is starting is:
java.lang.NullPointerException
at com/ms/fx/FxFormattedText.getOffsetFromPos
at com/ms/ui/UIDrawText.getCharFromScreen
at com/ms/ui/UIDrawText.paint
at com/ms/ui/UIComponent.update
at com/ms/ui/UIDrawText.update
at com/ms/ui/UIComponent.repaint
at com/ms/ui/UIStateComponent.setRedrawing
at com/ms/ui/UIComponent.relayout
at com/ms/ui/UIPanel.ª
at com/ms/ui/UIPanel.setChildSize
at com/ms/ui/UIComponent.setSize
at com/ms/ui/UIDrawText.setSize
at com/ms/ui/UIViewer.layout
at com/ms/ui/UIComponent.relayout
at com/ms/ui/UIPanel.ª
at com/ms/ui/UIPanel.setChildBounds
at com/ms/ui/UIComponent.setBounds
at com/ms/ui/UIComponent.setBounds
at com/ms/ui/UIScrollViewer.layout
at com/ms/ui/UIComponent.relayout
at com/ms/ui/UIPanel.ª
at com/ms/ui/UIPanel.setChildBounds
at com/ms/ui/UIComponent.setBounds
at com/ms/ui/UIComponent.setBounds
at com/ms/ui/UIContainer.layout
at com/ms/ui/AwtUIHost.layout
at java/awt/Container.doLayout
at java/awt/Container.validateTree
at com/ms/ui/AwtUIHost.validateTree
at java/awt/Container.validate
at com/ms/ui/AwtUIHost.validate
at com/ms/awt/WUIPeer.setBounds
at java/awt/Component.reshape
at java/awt/Component.setBounds
at java/awt/BorderLayout.layoutContainer
at java/awt/Container.layout
at java/awt/Container.doLayout
at java/awt/Container.validateTree
at java/awt/Container.validateTree
at java/awt/Container.validate
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
Any hints?
Cheers
/Jocke
Occasionally my Applet gives me just a blank window and an
error message in the IE java console when it is about to start.
I'm running IE 6.0 and Microsoft's own JVM.
My Applet init code is very simple:
nl = System.getProperty("line.separator");
textArea = new TextArea(null, 20, 40,
TextArea.SCROLLBARS_VERTICAL_ONLY);
textArea.setEditable(false);
setLayout(new BorderLayout(1, 1));
add("Center", textArea);
mainThread = new Thread(this);
mainThread.start();
The mainThread just do a:
textArea.setText(nl+nl+"Console messages will be shown below:"+nl);
and some calls to:
public static void consolePrint(TextArea ta, String message, String nl) {
String timeStamp = new Date().toLocaleString();
ta.append("=== "+timeStamp+nl+message+nl+nl);
}
The error I get in the Java console when the Applet is starting is:
java.lang.NullPointerException
at com/ms/fx/FxFormattedText.getOffsetFromPos
at com/ms/ui/UIDrawText.getCharFromScreen
at com/ms/ui/UIDrawText.paint
at com/ms/ui/UIComponent.update
at com/ms/ui/UIDrawText.update
at com/ms/ui/UIComponent.repaint
at com/ms/ui/UIStateComponent.setRedrawing
at com/ms/ui/UIComponent.relayout
at com/ms/ui/UIPanel.ª
at com/ms/ui/UIPanel.setChildSize
at com/ms/ui/UIComponent.setSize
at com/ms/ui/UIDrawText.setSize
at com/ms/ui/UIViewer.layout
at com/ms/ui/UIComponent.relayout
at com/ms/ui/UIPanel.ª
at com/ms/ui/UIPanel.setChildBounds
at com/ms/ui/UIComponent.setBounds
at com/ms/ui/UIComponent.setBounds
at com/ms/ui/UIScrollViewer.layout
at com/ms/ui/UIComponent.relayout
at com/ms/ui/UIPanel.ª
at com/ms/ui/UIPanel.setChildBounds
at com/ms/ui/UIComponent.setBounds
at com/ms/ui/UIComponent.setBounds
at com/ms/ui/UIContainer.layout
at com/ms/ui/AwtUIHost.layout
at java/awt/Container.doLayout
at java/awt/Container.validateTree
at com/ms/ui/AwtUIHost.validateTree
at java/awt/Container.validate
at com/ms/ui/AwtUIHost.validate
at com/ms/awt/WUIPeer.setBounds
at java/awt/Component.reshape
at java/awt/Component.setBounds
at java/awt/BorderLayout.layoutContainer
at java/awt/Container.layout
at java/awt/Container.doLayout
at java/awt/Container.validateTree
at java/awt/Container.validateTree
at java/awt/Container.validate
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
Any hints?
Cheers
/Jocke