Class JSpinnerUtil

java.lang.Object
jmri.util.swing.JSpinnerUtil

public class JSpinnerUtil extends Object
Utility class providing common methods for working with JSpinner components in Swing.
  • Method Details

    • setCommitsOnValidEdit

      public static void setCommitsOnValidEdit(JSpinner spinner, boolean newVal)
      Sets whether the JSpinner's text editor commits the value to the spinner model.

      By default, JSpinners only update their value when enter is pressed or focus leaves the JFormattedTextField.

      Parameters:
      spinner - the JSpinner to modify.
      newVal - true to commit on valid edits, else false ( default JSpinner )