package fontweighttest; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Label; import javafx.scene.layout.VBox; import javafx.stage.Stage; public class FontWeightTest extends Application { public static void main(String[] args) { Application.launch(args); } @Override public void start(Stage primaryStage) { VBox root = new VBox(); String[] weights = { "normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900" }; for (String weight : weights) { final Label label = new Label(weight); label.setStyle("-fx-font-size:20; -fx-font-weight: " + weight + ";"); root.getChildren().add(label); } primaryStage.setScene(new Scene(root, 100, 150)); primaryStage.show(); } }