From: gmungoc Date: Thu, 23 Apr 2015 08:21:53 +0000 (+0100) Subject: JAL-845 set split frame divider safely for eXpand Views X-Git-Tag: Jalview_2_9~55 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=dc74f4ac53cb25b16760263aead95a24ed8f33cd;p=jalview.git JAL-845 set split frame divider safely for eXpand Views --- diff --git a/src/jalview/jbgui/GSplitFrame.java b/src/jalview/jbgui/GSplitFrame.java index a377571..bcd5f64 100644 --- a/src/jalview/jbgui/GSplitFrame.java +++ b/src/jalview/jbgui/GSplitFrame.java @@ -45,7 +45,8 @@ public class GSplitFrame extends JInternalFrame splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, topFrame, bottomFrame); splitPane.setVisible(true); - final double ratio = topFrame.getHeight() + final double ratio = bottomFrame.getHeight() == 0 ? 0.5d : topFrame + .getHeight() / (double) (topFrame.getHeight() + bottomFrame.getHeight()); splitPane.setDividerLocation(ratio); splitPane.setResizeWeight(ratio);