From 98637eee5027a7d57c71a38a3d4062220bb94f9c Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 4 Feb 2011 12:04:46 +0000 Subject: [PATCH] 1.2ish awt methods --- src/jalview/appletgui/AlignmentPanel.java | 4 ++-- src/jalview/appletgui/AnnotationPanel.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jalview/appletgui/AlignmentPanel.java b/src/jalview/appletgui/AlignmentPanel.java index 05ecdcc..5373894 100755 --- a/src/jalview/appletgui/AlignmentPanel.java +++ b/src/jalview/appletgui/AlignmentPanel.java @@ -848,9 +848,9 @@ public class AlignmentPanel extends Panel implements AdjustmentListener } int mheight=height; // sets initial preferred height - if (height > alignFrame.getHeight() / 2) + if (height > alignFrame.getSize().height/ 2) { - height = alignFrame.getHeight() / 2; + height = alignFrame.getSize().height / 2; } apvscroll.setValues(apvscroll.getValue(), height, 0, mheight); annotationPanel.setScrollOffset(apvscroll.getValue()); diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index b09e9ef..fb7bce5 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -81,7 +81,7 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, av = ap.av; setLayout(null); int height = adjustPanelHeight(); - ap.apvscroll.setValues(0, getHeight(), 0, height); + ap.apvscroll.setValues(0, getSize().height, 0, height); addMouseMotionListener(this); -- 1.7.10.2