JAL-2255 Bug fix bug/JAL-2255_seq-fetcher-broken-on-linux
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 10 Apr 2017 16:04:13 +0000 (17:04 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 10 Apr 2017 16:04:13 +0000 (17:04 +0100)
src/jalview/gui/JDatabaseTree.java

index f07ade2..d92f6c0 100644 (file)
@@ -151,16 +151,16 @@ public class JDatabaseTree extends JalviewDialog implements KeyListener
     }
     // and sort the tree
     sortTreeNodes(root);
-    svp = new JScrollPane();
-    // svp.setAutoscrolls(true);
     dbviews = new JTree(new DefaultTreeModel(root, false));
     dbviews.setCellRenderer(new DbTreeRenderer(this));
 
     dbviews.getSelectionModel().setSelectionMode(
             TreeSelectionModel.SINGLE_TREE_SELECTION);
-    svp.getViewport().setView(dbviews);
-    svp.getViewport().setMinimumSize(new Dimension(300, 200));
-    svp.setSize(300, 250);
+    svp = new JScrollPane(dbviews);
+    svp.setMinimumSize(new Dimension(100, 200));
+    svp.setPreferredSize(new Dimension(200, 400));
+    svp.setMaximumSize(new Dimension(300, 600));
+
     JPanel panel = new JPanel(new BorderLayout());
     panel.setSize(new Dimension(350, 220));
     panel.add(svp);
@@ -203,7 +203,6 @@ public class JDatabaseTree extends JalviewDialog implements KeyListener
     dbstat.add(dbstatex);
     jc.add(dbstat, BorderLayout.SOUTH);
     jc.validate();
-    // j.setPreferredSize(new Dimension(300,50));
     add(jc, BorderLayout.CENTER);
     ok.setEnabled(false);
     j.add(ok);