From: tcofoegbu Date: Mon, 10 Apr 2017 16:04:13 +0000 (+0100) Subject: JAL-2255 Bug fix X-Git-Tag: Release_2_10_2~3^2~133^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a38d7808b759178025820c8d220a37d1442a57b3;p=jalview.git JAL-2255 Bug fix --- diff --git a/src/jalview/gui/JDatabaseTree.java b/src/jalview/gui/JDatabaseTree.java index f07ade2..d92f6c0 100644 --- a/src/jalview/gui/JDatabaseTree.java +++ b/src/jalview/gui/JDatabaseTree.java @@ -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);