Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: TextInputDialog

[14:7] extends: Dialog

Wraps JavaFX TextInputDialog, a dialog that prompts the user to enter a string and returns the entered text. An optional default value pre-fills the input field when the dialog opens. Title, header text, and content text can be set to provide context. Call showAndWait() to block until the user confirms or cancels, then inspect the returned value for the entered text.

Methods

  • TextInputDialog (string DefaultValue = "")

    Creates a new TextInputDialog with an optional default value.

    • @p DefaultValue is a string with the initial text.
  • getEditor ()

    Returns the editor TextField for this dialog. The editor is the underlying input control where the user types the response.

    • @r An AJO around the javafx.scene.control.TextField editor.
  • getDefaultValue ()

    Returns the default value displayed in the editor when the dialog opens. This is the value passed to the constructor.

    • @r A string with the default value.