From 2a15dbb3db1c89edd6bbc0d1ddf80863feb2203f Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 17 Jan 2005 16:03:28 +0000 Subject: [PATCH] Dont use addToDesktop for splashscreen --- src/jalview/gui/Desktop.java | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index feb1e00..ad7cb84 100755 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -22,7 +22,6 @@ public class Desktop extends jalview.jbgui.GDesktop public static JDesktopPane desktop; static int openFrameCount = 0; static final int xOffset = 30, yOffset = 30; - static boolean splashScreenVisible = false; public Desktop() { @@ -65,23 +64,29 @@ public class Desktop extends jalview.jbgui.GDesktop SplashScreen splash = new SplashScreen(frame, image); frame.setContentPane(splash); - addInternalFrame(frame, "",845,200); - splashScreenVisible = true; - + desktop.add(frame); + frame.setVisible(true); + openFrameCount++; + try + { + frame.setSelected(true); + } + catch (java.beans.PropertyVetoException e) + {} + frame.setResizable(true); + frame.setSize(845, 200); frame.setLocation( (int)((getWidth()-845) /2), (int)((getHeight()-240) /2)); frame.setClosable(false); frame.setIconifiable(false); frame.setMaximizable(false); frame.setFrameIcon(null); - splashScreenVisible = false; } public static void addInternalFrame(final JInternalFrame frame, String title, int w, int h) { - if(!splashScreenVisible) - frame.setVisible(true); //necessary as of 1.3 desktop.add(frame); + frame.setVisible(true); openFrameCount++; try { frame.setSelected(true); @@ -100,6 +105,7 @@ public class Desktop extends jalview.jbgui.GDesktop { openFrameCount--; windowMenu.remove(menuItem); + System.out.println(openFrameCount); }; }); -- 1.7.10.2