JAppletNullPointerException

Hi

This is my JApplet

import javax.swing.*;

import java.awt.event.*;

publicclass J21emlaextends JApplet

{

public J21emla()

{

}

publicvoid start()

{

setVisible(true);

}

}

For the first time it looks ok, but when i hit the refresh on the browser i get this:

java.lang.NullPointerException

at sun.java2d.SunGraphics2D.checkFontInfo(Unknown Source)

at sun.java2d.SunGraphics2D.<init>(Unknown Source)

at sun.awt.image.SunVolatileImage.createGraphics(Unknown Source)

at java.awt.image.VolatileImage.getGraphics(Unknown Source)

at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown Source)

at javax.swing.JComponent.paintDoubleBuffered(Unknown Source)

at javax.swing.JComponent.paint(Unknown Source)

at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)

at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)

at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)

at java.awt.Container.paint(Unknown Source)

at sun.awt.RepaintArea.paintRect(Unknown Source)

at sun.awt.RepaintArea.paint(Unknown Source)

at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

This is the HTML page:

<html>

<head>

<title>J21 eml</title>

</head>

<body>

<!--"CONVERTED_APPLET"-->

<!-- CONVERTER VERSION 1.3 -->

<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"

WIDTH ="562" HEIGHT ="429"

codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">

<PARAM NAME = CODEVALUE ="J21emla" >

<PARAM NAME = ARCHIVE VALUE ="J21emla" >

<PARAM NAME = CODEBASE VALUE ="c:j_applet" >

<PARAM NAME="type"VALUE="application/x-java-applet;version=1.3">

<PARAM NAME="scriptable" VALUE="false">

<COMMENT>

<EMBED type="application/x-java-applet;version=1.3"

CODE ="J21emla" CODEBASE ="c:j_applet" WIDTH ="4" HEIGHT ="3" scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"><NOEMBED></COMMENT>

</NOEMBED></EMBED>

</OBJECT>

<!--

<APPLET CODE ="J21emla" CODEBASE ="c:j_applet" WIDTH ="646" HEIGHT ="476">

</APPLET>

-->

<!--"END_CONVERTED_APPLET"-->

</body>

</html>

Any Ideas ?

Tnx Noah

[4515 byte] By [noah.w] at [2007-9-26 5:53:02]
# 1
Have you received an answer? I have the same problem when my applet is working with a GIF. If I work with a JPG, I don't get the error on refresh.
tmacy2 at 2007-7-1 14:22:25 > top of Java-index,Archived Forums,Swing...
# 2
Look at this!! http://developer.java.sun.com/developer/bugParade/bugs/4458594.html
tmacy2 at 2007-7-1 14:22:25 > top of Java-index,Archived Forums,Swing...
# 3
Tnx TomThis solved the problam, i was looking at the bugs report but did not find it, Tnx again.Noah
noah.w at 2007-7-1 14:22:25 > top of Java-index,Archived Forums,Swing...