Index: src/gnu/gcjwebplugin/PluginAppletWindow.java =================================================================== RCS file: /sources/gcjwebplugin/gcjwebplugin/src/gnu/gcjwebplugin/PluginAppletWindow.java,v retrieving revision 1.27 diff -u -r1.27 PluginAppletWindow.java --- src/gnu/gcjwebplugin/PluginAppletWindow.java 17 Apr 2006 16:27:32 -0000 1.27 +++ src/gnu/gcjwebplugin/PluginAppletWindow.java 18 Apr 2006 20:06:38 -0000 @@ -419,7 +419,10 @@ ((PluginAppletContext) context).addApplet(applet); applet.setStub(new CommonAppletStub(tag, context, applet)); - applet.setSize(getSize()); + Dimension size = getSize(); + if (size.width == 0 || size.height == 0) + size = tag.getSize(); + applet.setSize(size); // Initialize the applet before showing this window so that // the applet doesn't receive events before it has been @@ -427,9 +430,6 @@ applet.init(); applet.start(); setVisible(true); - applet.invalidate(); - applet.validate(); - applet.repaint(); } } } Index: src/gnu/gcjwebplugin/StandaloneAppletWindow.java =================================================================== RCS file: /sources/gcjwebplugin/gcjwebplugin/src/gnu/gcjwebplugin/StandaloneAppletWindow.java,v retrieving revision 1.28 diff -u -r1.28 StandaloneAppletWindow.java --- src/gnu/gcjwebplugin/StandaloneAppletWindow.java 11 Apr 2006 18:21:37 -0000 1.28 +++ src/gnu/gcjwebplugin/StandaloneAppletWindow.java 18 Apr 2006 20:06:38 -0000 @@ -194,41 +194,30 @@ if (testWindowCountProperty == null) { - // Create the frame's peer. Otherwise getPreferredSize will read - // its insets as 0. - addNotify(); - Insets i = getInsets (); - Dimension size = tag.getSize(); - setSize(i.left + size.width + i.right, - i.top + size.height + status.getPreferredSize ().height - + i.bottom); + // Create the frame's peer. Otherwise getPreferredSize will read + // its insets as 0. + addNotify(); + Insets i = getInsets(); + Dimension size = tag.getSize(); + setSize(i.left + size.width + i.right, + i.top + size.height + status.getPreferredSize().height + + i.bottom); applet.setSize(size); // Initialize the applet before showing this window so that // the applet doesn't receive events before it has been // initialized. - applet.init (); - setVisible (true); - applet.invalidate(); - applet.validate(); - applet.repaint(); - applet.start(); - applet.invalidate(); - applet.validate(); - applet.repaint(); + applet.init(); + applet.start(); + setVisible(true); } else { - applet.init(); - applet.invalidate(); - applet.validate(); - applet.repaint(); - applet.start(); - applet.invalidate(); - applet.validate(); - applet.repaint(); - if (++StandaloneAppletWindow.testWindowCount == Integer.decode(testWindowCountProperty).intValue()) - System.exit(0); + applet.init(); + applet.start(); + if (++StandaloneAppletWindow.testWindowCount == + Integer.decode(testWindowCountProperty).intValue()) + System.exit(0); } }