JAL-1153 new runtime property set to first non-null annotation element colour
[jalview.git] / src / jalview / gui / SplashScreen.java
index f7c42b3..32c6aac 100755 (executable)
@@ -106,11 +106,6 @@ public class SplashScreen extends JPanel implements Runnable
     authlist.setEditable(false);
     authlist.addMouseListener(closer);
     refreshText();
-    iframe.setVisible(true);
-    iframe.setBounds((int) ((Desktop.instance.getWidth() - 750) / 2),
-            (int) ((Desktop.instance.getHeight() - 160) / 2), 750,
-            iframe.getPreferredSize().height);
-
   }
 
   long oldtext = -1;
@@ -121,11 +116,25 @@ public class SplashScreen extends JPanel implements Runnable
   protected boolean refreshText()
   {
     String newtext = Desktop.instance.getAboutMessage(true).toString();
-    if (oldtext != newtext.hashCode())
+    System.err.println("Text found: \n"+newtext+"\nEnd of newtext.");
+    if (oldtext != newtext.length())
     {
-      oldtext = newtext.hashCode();
+      iframe.setVisible(false);
+      oldtext = newtext.length();
+      authlist=new JTextPane();
+      authlist.setEditable(false);
+      authlist.addMouseListener(closer);
       authlist.setContentType("text/html");
       authlist.setText(newtext);
+      authlist.setVisible(true);
+      add(authlist, BorderLayout.CENTER);
+      iframe.pack();
+      iframe.setVisible(true);
+      iframe.setBounds((int) ((Desktop.instance.getWidth() - 750) / 2),
+              (int) ((Desktop.instance.getHeight() - 160) / 2), 750,
+              iframe.getPreferredSize().height);
+      System.err.println("New preferred size: "+iframe.getPreferredSize().height);
+
       return true;
     }
     return false;
@@ -144,7 +153,7 @@ public class SplashScreen extends JPanel implements Runnable
     {
       try
       {
-        Thread.sleep(1000);
+        Thread.sleep(500);
       } catch (Exception ex)
       {
       }
@@ -153,12 +162,10 @@ public class SplashScreen extends JPanel implements Runnable
       {
         visible = false;
       }
-      else
+
+      if (visible && refreshText())
       {
-        if (refreshText())
-        {
           repaint();
-        }
       }
     }