//package demo; import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.paint.Color; import javafx.stage.Stage; public class ButtonSkinBug extends Application { private Scene scene; @Override public void start(Stage stage) { // create scene stage.setTitle("Button Click"); scene = new Scene(new Group(), 590, 400, Color.web("#666970")); stage.setScene(scene); Button button = new Button(); button.setText("Click on me"); button.setOnAction(new EventHandler() { @Override public void handle(ActionEvent t) { System.out.println("button clicked"); } }); ((Group)scene.getRoot()).getChildren().add(button); stage.setVisible(true); } public static void main(String[] args) { Application.launch(args); } }