Add internalFrameActivated listener
authoramwaterhouse <Andrew Waterhouse>
Tue, 6 Dec 2005 12:19:44 +0000 (12:19 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 6 Dec 2005 12:19:44 +0000 (12:19 +0000)
src/jalview/gui/Desktop.java

index 3acefe7..8a96033 100755 (executable)
@@ -187,6 +187,15 @@ public class Desktop extends jalview.jbgui.GDesktop
         final JMenuItem menuItem = new JMenuItem(title);
         frame.addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()
             {
+              public void internalFrameActivated(javax.swing.event.
+                                                 InternalFrameEvent evt)
+              {
+                JInternalFrame itf = desktop.getSelectedFrame();
+                if (itf != null)
+                  itf.requestFocus();
+
+              }
+
                 public void internalFrameClosed(
                     javax.swing.event.InternalFrameEvent evt)
                 {