Focus listener on Tabbed pane, gives keyboard focus back to alignFrame
authoramwaterhouse <Andrew Waterhouse>
Fri, 27 Oct 2006 16:12:09 +0000 (16:12 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 27 Oct 2006 16:12:09 +0000 (16:12 +0000)
src/jalview/jbgui/GAlignFrame.java

index ea6ee25..4dcd0db 100755 (executable)
@@ -1127,6 +1127,13 @@ public class GAlignFrame
         tabbedPane_mousePressed(e);\r
       }\r
     });\r
+    tabbedPane.addFocusListener(new FocusAdapter()\r
+    {\r
+      public void focusGained(FocusEvent e)\r
+      {\r
+        tabbedPane_focusGained(e);\r
+      }\r
+    });\r
 \r
     alignFrameMenuBar.add(fileMenu);\r
     alignFrameMenuBar.add(editMenu);\r
@@ -1649,4 +1656,9 @@ public class GAlignFrame
   {\r
 \r
   }\r
+\r
+  public void tabbedPane_focusGained(FocusEvent e)\r
+  {\r
+    requestFocus();\r
+  }\r
 }\r