import javafx.application.Application; import javafx.application.Launcher; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.text.Font; import javafx.scene.text.Text; import javafx.stage.Stage; public class FontSizeTest1 extends Application { @Override public void start() { Stage stage = new Stage(); stage.setTitle("Font Size Test"); Group root = new Group(); Scene scene = new Scene(root, 600, 400); Text text12 = new Text("AmbleCn 12-pix"); text12.setFont(new Font(12.0f)); text12.setLayoutX(10); text12.setLayoutY(50); Text text72 = new Text("AmbleCn 72-pix"); text72.setFont(new Font(72.0f)); text72.setLayoutX(10); text72.setLayoutY(200); root.getChildren().add(text12); root.getChildren().add(text72); stage.setScene(scene); stage.setVisible(true); } public static void main(String[] args) { Launcher.launch(FontSizeTest1.class,args); } }