A strange problem occured, when I tried my GUI, develloped with JDK1.1.4
and Swing 0.7:
I'm using an applet, that does nothing but creating an instance of
JFrame in its init- method. So far everything
is alright:
The JFrame, and all of its components appear on the screen and no
exception is thrown. But immediatly after
the init- method of the applet terminates (or sometimes during the init-
method- this may vary!) this exception is
thrown:
sun.applet.AppletSecurityException: checkawteventqueueaccess
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at sun.applet.AppletSecurityException.<init>(Compiled Code)
at sun.applet.AppletSecurity.checkAwtEventQueueAccess(Compiled
Code)
at java.awt.Toolkit.getSystemEventQueue(Compiled Code)
at com.sun.java.swing.Timer.post(Compiled Code)
at com.sun.java.swing.TimerQueue.postExpiredTimers(Compiled
Code)
at com.sun.java.swing.TimerQueue.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)
and no paint- events are posted any more! That means i.e you click on a
radio button, but nothing changes on the screen.
When you maximize and minimize the window, change its size or force the
system in any other way to repaint it,
the changes are made. Despite of the non- painting, the selection-
changed event is punctually posted!
I guess, Swing starts an own thread to do the painting, and this thread
raises the exception and terminates!
The problem occurs with the Java Activator, Applet- Viewer, Netscape
4.04 and the Microsoft IE4.01 (with and without activator!)
I would be very pleased, if anybody helps me!
Greetings, Markus!
Check the Bug parade for a better explanation by serching for
"checkawteventqueueaccess"
Hope that helps
Jaideep