Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8132331

Standard TextFormatter instances

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • None
    • javafx
    • None
    • generic
    • generic

      It is a rather common request from application users that they want an application to not allow "unwanted" or "unparseable" characters to be entered into text input controls. For example, a TextField bound to an integer should not accept letters.

      While TextFormatter is available since 8u40 and provides a basic solution to that, it is a real pain to configure, particularly in FXML-driven projects.

      It would be great if a future release of JavaFX would provide predefined, locale-bound TextFormatter instances which can be referenced from FXML.

      Example:

      <TextField textFormatter="$INTEGER_FORMATTER" />
      <TextField textFormatter="$DECIMAL_FORMATTER" />

            leifs Leif Samuelsson (Inactive)
            mkarg Markus Karg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: