j2sNative clean-up. Fixes problem with second try of sequence fetching
[jalview.git] / src / jalview / gui / SplashScreen.java
index 6bb96c0..f7d7cbf 100755 (executable)
@@ -88,7 +88,6 @@ public class SplashScreen extends JPanel
     this.interactiveDialog = interactive;
     // show a splashscreen that will disapper
     if (Platform.isJS()) // BH 2019
-    // if (/** @j2sNative true || */ false)
     {
       authlist = new JLabel("");
       run();
@@ -173,8 +172,13 @@ public class SplashScreen extends JPanel
     this.setLayout(new BorderLayout());
     iframe.setContentPane(this);
     iframe.setLayer(JLayeredPane.PALETTE_LAYER);
+    if (Platform.isJS())
+    {
+      // ignore in JavaScript
+    }
+    else
     /**
-     * we add image directly in html for javascript ?
+     * Java only
      * 
      * @j2sNative
      */
@@ -206,7 +210,6 @@ public class SplashScreen extends JPanel
       iframe.setVisible(false);
       oldtext = newtext.length();
       if (Platform.isJS()) // BH 2019
-      // if (/** @j2sNative true || */ false)
       {
         authlist = new JLabel(
                 "<html><br/><br/><img src=\"swingjs/j2s/images/Jalview_Logo.png\"/><br/>"
@@ -215,19 +218,17 @@ public class SplashScreen extends JPanel
         ((JLabel) authlist).setBackground(Color.white);
       }
       else
+      /**
+       * Java only
+       * 
+       * @j2sNative
+       */
       {
-        /**
-         * Java only
-         * 
-         * @j2sNative
-         */
-        {
-          authlist = new JTextPane();
-          ((JTextPane) authlist).setEditable(false);
-          ((JTextPane) authlist).setContentType("text/html");
-          ((JTextPane) authlist).setText(newtext);
-          ((JTextPane) authlist).addHyperlinkListener(this);
-        }
+        authlist = new JTextPane();
+        ((JTextPane) authlist).setEditable(false);
+        ((JTextPane) authlist).setContentType("text/html");
+        ((JTextPane) authlist).setText(newtext);
+        ((JTextPane) authlist).addHyperlinkListener(this);
       }
       authlist.addMouseListener(closer);