schange text size in javafx code example
Example 1: how to change font in javafx
t.setText("This is a text sample");
t.setFont(Font.font ("Verdana", 20));
t.setFill(Color.RED);
Example 2: javafx change text size
text.setFont(Font.font ("arial", 24));
or
text.setStyle("-fx-font: 24 arial;");