src/macosx/classes/sun/lwawt/LWTextComponentPeer.java

Print this page

        

@@ -70,16 +70,16 @@
             getTextComponent().getDocument().addDocumentListener(this);
         }
         setEditable(getTarget().isEditable());
         setText(getTarget().getText());
         getTarget().addInputMethodListener(this);
+        setCaretPosition(getTarget().getCaretPosition());
         final int start = getTarget().getSelectionStart();
         final int end = getTarget().getSelectionEnd();
         if (end > start) {
             select(start, end);
         }
-        setCaretPosition(getTarget().getCaretPosition());
         firstChangeSkipped = true;
     }
 
     abstract JTextComponent getTextComponent();