Give focus to textarea on startup
authoramwaterhouse <Andrew Waterhouse>
Tue, 13 Sep 2005 17:44:59 +0000 (17:44 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 13 Sep 2005 17:44:59 +0000 (17:44 +0000)
src/jalview/gui/CutAndPasteTransfer.java

index bd2eb7d..10f9777 100755 (executable)
@@ -29,6 +29,7 @@ import java.awt.datatransfer.*;
 import java.awt.event.*;\r
 \r
 import javax.swing.*;\r
+import javax.swing.event.InternalFrameEvent;\r
 \r
 \r
 /**\r
@@ -45,6 +46,13 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer
     public void setForInput()\r
     {\r
         getContentPane().add(inputButtonPanel, java.awt.BorderLayout.SOUTH);\r
+          SwingUtilities.invokeLater(new Runnable()\r
+          {\r
+            public void run()\r
+            {\r
+              textarea.requestFocus();\r
+            }\r
+          });\r
     }\r
 \r
     /**\r