/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package javafxbugs; import javafx.application.Application; import javafx.application.Launcher; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.layout.GridPane; import javafx.scene.shape.Circle; import javafx.scene.shape.Rectangle; import javafx.stage.Stage; /** * @author aim */ public class RT11742 extends Application { @Override public void start(Stage stage) { stage.setTitle("Bug"); GridPane gridpane = new GridPane(); gridpane.getStyleClass().add("form"); gridpane.setGridLinesVisible(true); Button button = new Button("This is a silly example"); Rectangle rect = new Rectangle(10,10); Rectangle rect2 = new Rectangle(40,60); Rectangle rect3 = new Rectangle(80,80); Circle circle = new Circle(40); Circle circle3 = new Circle(55); Circle circle2 = new Circle(50); Label label = new Label("This is a plain label"); GridPane.setConstraints(button,0,1); GridPane.setConstraints(rect,3,1); GridPane.setConstraints(circle3,3,0); GridPane.setConstraints(circle,2,2); GridPane.setConstraints(circle2,0,2); GridPane.setConstraints(label,2,0); GridPane.setConstraints(rect2,1,0); GridPane.setConstraints(rect3,1,1); gridpane.getChildren().addAll(button, rect, circle, label, rect2, circle2, rect3,circle3); Scene scene = new Scene(gridpane); scene.getStylesheets().addAll("/javafxbugs/rt11742.css"); stage.setScene(scene); stage.setVisible(true); } /** * @param args the command line arguments */ public static void main(String[] args) { Launcher.launch(RT11742.class, args); } }