Java examples for JavaFX:Button
create JavaFX Button
//package com.java2s; import javafx.scene.control.Button; 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);//from w ww.j av a 2 s . co m public static Button createButton(GridPane buttonPane, String label, int colIndex, int rowIndex) { Button button = new Button(label); button.setFont(defaultLabelFont); buttonPane.add(button, colIndex, rowIndex); return button; } }