import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.CheckBox; import javafx.scene.control.Label; import javafx.scene.text.Font; import javafx.scene.text.Text; import javafx.stage.Stage; public class CheckBoxBug extends Application { @Override public void start(Stage stage) { stage.setTitle("CheckBox Bug"); Group root = new Group(); Scene scene = new Scene(root, 600, 400); Text text1 = new Text("TEXT_WITH_UNDERSCORE"); text1.setLayoutX(10); text1.setLayoutY(30); Text text2 = new Text("text_with_underscore"); text2.setLayoutX(10); text2.setLayoutY(60); Label label1 = new Label("LABEL_WITH_UNDERSCORE"); label1.setLayoutX(10); label1.setLayoutY(90); Label label2 = new Label("label_with_underscore"); label2.setLayoutX(10); label2.setLayoutY(120); CheckBox checkBox1 = new CheckBox("CHECKBOX_WITH_UNDERSCORE"); checkBox1.setLayoutX(10); checkBox1.setLayoutY(150); CheckBox checkBox2 = new CheckBox("checkbox_with_underscore"); checkBox2.setLayoutX(10); checkBox2.setLayoutY(180); root.getChildren().addAll(text1, text2, label1, label2, checkBox1, checkBox2); stage.setScene(scene); stage.show(); } public static void main(String[] args) { Application.launch(args); } }