(ns
  ^{:doc 
  
  "A patched JTextField implementation."
  
    :author "Frank Mosebach"}
  fm.simrunner.gui.text-field
  (:gen-class
    :name fm.simrunner.gui.TextField
    :extends javax.swing.JTextField
    :exposes-methods {setText superSetText}))

(defn -setText [this text]
  (when (not= (.getText this) text)
    (.superSetText this text)))


(ns
  ^{:doc 
  
  "A patched JTextField implementation."
  
    :author "Frank Mosebach"}
  fm.simrunner.gui.text-field
  (:gen-class
    :name fm.simrunner.gui.TextField
    :extends javax.swing.JTextField
    :exposes-methods {setText superSetText}))

(defn -setText [this text]
  (when (not= (.getText this) text)
    (doto this
      (.superSetText text)
      (.setCaretPosition 0))))


Reset the caret to position 0 when setting the text.
Reset the caret to position 0 when setting the text.

DrDoofenshmirtz/SimRunner,DrDoofenshmirtz/SimRunner