1.2ish awt methods
[jalview.git] / src / jalview / appletgui / AlignmentPanel.java
index d8e03f7..5373894 100755 (executable)
@@ -836,7 +836,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener
   {
     // TODO: display vertical annotation scrollbar if necessary
     // this is called after loading new annotation onto alignment
-    if (alignFrame.getHeight() == 0)
+    if (alignFrame.getSize().height == 0)
     {
       System.out.println("NEEDS FIXING");
     }
@@ -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());
@@ -858,11 +858,12 @@ public class AlignmentPanel extends Panel implements AdjustmentListener
     apvscroll.addNotify();
     hscroll.addNotify();
 
-    annotationPanelHolder.setPreferredSize(new Dimension(annotationPanel
-            .getWidth(), height));
+    annotationPanelHolder.setSize(new Dimension(annotationPanel
+            .getSize().width, height));
 
-    annotationSpaceFillerHolder.setPreferredSize(new Dimension(
-            annotationSpaceFillerHolder.getWidth(), height));
+    annotationSpaceFillerHolder.setSize(new Dimension(
+            annotationSpaceFillerHolder.getSize().width
+            , height));
     
     //annotationScroller.validate();// repaint();
     validate();