import javafx.application.Application; import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.control.CheckBox; import javafx.scene.layout.HBox; import javafx.stage.Stage; public class CheckBoxWrappedText extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) throws Exception { HBox root = new HBox(4); root.getChildren().add(getCheckBox(true)); root.getChildren().add(getCheckBox(false)); Scene scene = new Scene(root, 400, 400); stage.setScene(scene); stage.show(); } private Node getCheckBox(final boolean isWrapped) { String WRAPPED = "wrapped wrapped wrapped wrapped wrapped wrapped"; CheckBox checkBox = new CheckBox(WRAPPED); double min_width = 0; double min_height = 0; double pref_width = 100; double pref_height = 100; double max_width = 200; double max_height = 200; checkBox.setMinSize(min_width, min_height); checkBox.setPrefSize(pref_width, pref_height); checkBox.setMaxSize(max_width, max_height); checkBox.setWrapText(isWrapped); return checkBox; } }