javafx character counter

Solutions on MaxInterview for javafx character counter by the best coders in the world

showing results for - "javafx character counter"
Aitana
03 Mar 2018
1@Override
2public void start(Stage primaryStage) {
3    TextField textField = new TextField();
4    Label label = new Label();
5    label.textProperty().bind(textField.textProperty()
6                                       .length()
7                                       .asString("Character Count: %d"));
8    VBox root = new VBox(label, textField);
9
10    Scene scene = new Scene(root);
11
12    primaryStage.setScene(scene);
13    primaryStage.show();
14}
15