TableView object, we can get an ObservableList of TableColumn items using the
getColumns() method.
JavaFX TextArea
The TextArea widget provides an area into which text may be entered. Unlike a TextField widget,
the text area can accommodate multiple lines of data.
Among the properties for this class are:
• promptText – A hint or prompt for the user on what to enter if the TextArea is empty.
See also:
• JavaFX TextField
JavaFX TextField
The TextField allows one to enter a line of text.
This component can fire an ActionEvent which happens when the ENTER key is pressed. Take
care that you realize that this is not the same as a content change.
If we want to detect a content change, we need to get the "text" property of the component and
add a ChangeListener to it.
For example:
ChangeListener<String> changeListener = new ChangeListener<String>() {
@Override
public void changed(ObservableValue<? extends String> observable, String oldValue, String
newValue) {
System.out.println("Text Change!");
}
};
baseURLTextField.textProperty().addListener(changeListener);
Among the properties for this class are:
• promptText – A hint or prompt for the user on what to enter if the TextField is
empty.
Page 277
Kommentare zu diesen Handbüchern