Java examples for JavaFX:ChoiceBox
create JavaFX Check Box
//package com.java2s; import javafx.scene.control.CheckBox; import javafx.scene.layout.GridPane; import javafx.scene.text.Font; import javafx.scene.text.FontWeight; public class Main { private static Font defaultLabelFont = Font.font("Tahoma", FontWeight.LIGHT, 14);/*www .ja va 2 s. c o m*/ public static CheckBox createCheckBox(GridPane gridPane, String label, int colIndex, int rowIndex) { return createCheckBox(gridPane, label, colIndex, rowIndex, 1, 1); } public static CheckBox createCheckBox(GridPane gridPane, String label, int colIndex, int rowIndex, int colSpan, int rowSpan) { CheckBox checkBox = new CheckBox(label); checkBox.setFont(defaultLabelFont); gridPane.add(checkBox, colIndex, rowIndex, colSpan, rowSpan); return checkBox; } }