3 import jalview.jbgui.GSplitFrame;
5 import javax.swing.JComponent;
6 import javax.swing.event.InternalFrameAdapter;
7 import javax.swing.event.InternalFrameEvent;
9 public class SplitFrame extends GSplitFrame
11 private static final long serialVersionUID = 1L;
13 public SplitFrame(JComponent top, JComponent bottom)
20 * Initialise this frame.
24 setSize(AlignFrame.DEFAULT_WIDTH, Desktop.instance.getHeight() - 10);
27 * Add a listener to tidy up when the frame is closed.
29 addInternalFrameListener(new InternalFrameAdapter()
32 public void internalFrameClosed(InternalFrameEvent evt)
34 if (getTopComponent() instanceof AlignFrame)
36 ((AlignFrame) getTopComponent())
37 .closeMenuItem_actionPerformed(true);
39 if (getBottomComponent() instanceof AlignFrame)
41 ((AlignFrame) getBottomComponent())
42 .closeMenuItem_actionPerformed(true);