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

Print this page

        

*** 69,85 **** // This listener should be added before setText(). getTextComponent().getDocument().addDocumentListener(this); } setEditable(getTarget().isEditable()); setText(getTarget().getText()); getTarget().addInputMethodListener(this); final int start = getTarget().getSelectionStart(); final int end = getTarget().getSelectionEnd(); if (end > start) { select(start, end); } - setCaretPosition(getTarget().getCaretPosition()); firstChangeSkipped = true; } @Override protected final void disposeImpl() { --- 69,85 ---- // This listener should be added before setText(). getTextComponent().getDocument().addDocumentListener(this); } setEditable(getTarget().isEditable()); setText(getTarget().getText()); + setCaretPosition(getTarget().getCaretPosition()); getTarget().addInputMethodListener(this); final int start = getTarget().getSelectionStart(); final int end = getTarget().getSelectionEnd(); if (end > start) { select(start, end); } firstChangeSkipped = true; } @Override protected final void disposeImpl() {