Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

javafx character counter

@Override
public void start(Stage primaryStage) {
    TextField textField = new TextField();
    Label label = new Label();
    label.textProperty().bind(textField.textProperty()
                                       .length()
                                       .asString("Character Count: %d"));
    VBox root = new VBox(label, textField);

    Scene scene = new Scene(root);

    primaryStage.setScene(scene);
    primaryStage.show();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javafx #character #counter
ADD COMMENT
Topic
Name
9+6 =