public void focusGained(FocusEvent e) { inModalMode = true; if (debug) System.out.println("gained focus"); setBlinkRate(500); // setCaretValue(caretValue); super.focusGained(e); }
private void setCaretValue(int i) { caret.setVisible(true); caretValue = i; int min = 0; int max = getText().length(); if (i < min) i = min; if (i > max) i = max; if (debug) System.out.println("setSelectionStart: " + i); setSelectionStart(i); setSelectionEnd(i); }