JDK-6633354 : AppletPanel loads Swing classes
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-11-22
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u10Fixed 7 b57Fixed
Description
sun.applet.AppletPanel uses SwingUtilities.invokeAndWait(). This causes loading of Swing jkernel bundles even for pure AWT applets.

Comments
EVALUATION the description section contains all information.
27-11-2007

SUGGESTED FIX Replace SwingUtilities with EventQueue: ------- AppletPanel.java ------- *** /tmp/sccs.ehY6TV Thu Nov 22 20:11:41 2007 --- AppletPanel.java Thu Nov 22 16:24:44 2007 *************** *** 45,51 **** import java.util.Collections; import java.util.Locale; import java.util.WeakHashMap; - import javax.swing.SwingUtilities; import sun.awt.AppContext; import sun.awt.EmbeddedFrame; import sun.awt.SunToolkit; --- 45,50 ---- *************** *** 451,457 **** try { final AppletPanel p = this; ! SwingUtilities.invokeAndWait(new Runnable() { public void run() { p.validate(); } --- 450,456 ---- try { final AppletPanel p = this; ! EventQueue.invokeAndWait(new Runnable() { public void run() { p.validate(); } *************** *** 481,487 **** final AppletPanel p = this; final Applet a = applet; ! SwingUtilities.invokeAndWait(new Runnable() { public void run() { p.validate(); a.setVisible(true); --- 480,486 ---- final AppletPanel p = this; final Applet a = applet; ! EventQueue.invokeAndWait(new Runnable() { public void run() { p.validate(); a.setVisible(true); *************** *** 515,521 **** try { final Applet a = applet; ! SwingUtilities.invokeAndWait(new Runnable() { public void run() { a.setVisible(false); --- 514,520 ---- try { final Applet a = applet; ! EventQueue.invokeAndWait(new Runnable() { public void run() { a.setVisible(false);
22-11-2007