/* * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */ package buttonbug; import com.sun.scenario.effect.Color4f; import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.geometry.Orientation; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.FlowPane; import javafx.scene.layout.StackPane; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; import javafx.stage.Stage; /** * * @author Aleksandr Sakharuk */ public class ButtonBug extends Application { /** * @param args the command line arguments */ public static void main(String[] args) { launch(args); } @Override public void start(Stage primaryStage) { Button btn = new Button("Bug"); Button btn2 = new Button("Bug"); FlowPane root = new FlowPane(Orientation.HORIZONTAL); root.getChildren().addAll(btn, btn2); primaryStage.setScene(new Scene(root, 300, 250, Color.GREEN)); primaryStage.show(); } }