JAL-4260 reinstate annotation auto-id-width for wrapped view in headless mode (JAL...
[jalview.git] / src / jalview / gui / OverviewPanel.java
index b84757a..872d142 100755 (executable)
@@ -413,7 +413,9 @@ public class OverviewPanel extends JPanel
        * close the parent frame (which also removes it from the
        * Desktop Windows menu)
        */
-      internalFrame.setClosed(true);
+      ((JInternalFrame) SwingUtilities
+              .getAncestorOfClass(JInternalFrame.class, (this)))
+                      .setClosed(true);
     } catch (PropertyVetoException e)
     {
       // ignore
@@ -480,4 +482,12 @@ public class OverviewPanel extends JPanel
   {
     return internalFrame.getBounds();
   }
+
+  /**
+   * Closes the frame containing the overview panel
+   */
+  public void close()
+  {
+    internalFrame.dispose();
+  }
 }