JAL-1130 JAL-1139 hardcode preferred height to logo image height
authorjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 1 Oct 2012 16:13:35 +0000 (17:13 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 1 Oct 2012 16:13:35 +0000 (17:13 +0100)
src/jalview/gui/SplashScreen.java

index 7f55f8b..3120388 100755 (executable)
@@ -123,13 +123,13 @@ public class SplashScreen extends JPanel implements Runnable, HyperlinkListener
     iframe.setContentPane(this);
     iframe.setLayer(JLayeredPane.PALETTE_LAYER);
 
-    Desktop.desktop.add(iframe);
     SplashImage splashimg = new SplashImage(image);
     iconimg.add(splashimg, BorderLayout.CENTER);
     add(iconimg, BorderLayout.NORTH);
     add(authlist, BorderLayout.CENTER);
     authlist.setEditable(false);
     authlist.addMouseListener(closer);
+    Desktop.desktop.add(iframe);
     refreshText();
   }
 
@@ -232,7 +232,12 @@ public class SplashScreen extends JPanel implements Runnable, HyperlinkListener
       setPreferredSize(new Dimension(image.getWidth(this) + 8,
               image.getHeight(this)));
     }
-
+    @Override
+    public Dimension getPreferredSize()
+    {
+     return new Dimension(image.getWidth(this) + 8,
+             image.getHeight(this));
+    }
     public void paintComponent(Graphics g)
     {
       g.setColor(Color.white);