/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package test.scenegraph.app; import javafx.application.Application; import javafx.scene.Cursor; import javafx.stage.Stage; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.scene.layout.FlowPane; //import javafx.scene.layout.LayoutInfo; import javafx.scene.layout.Priority; import javafx.scene.layout.TilePane; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; import javafx.scene.shape.Rectangle; /** * * @author shubov */ /* import javafx.application.*; import javafx.scene.*; import javafx.scene.shape.Rectangle; import javafx.stage.Stage; public class ShortAppWithoutDependencies extends Application { @Override public void start() { Stage stage = new Stage(); stage.setScene(new Scene(new Group(new Rectangle(10, 10, 50, 50)))); stage.setX(0); stage.setY(0); stage.setVisible(true); System.err.println("stageX=" + stage.getX()); System.err.println("stageY=" + stage.getY()); } public static void main(String[] args) { Launcher.launch(ShortAppWithoutDependencies.class, args); } } */ public class ShortAppWithoutDependencies extends Application { protected final static int width = 350; protected final static int height = 450; VBox vbox = new VBox(); public void start(Stage stage) { stage.setWidth(width); stage.setHeight(height); Group gr = new Group(); stage.setScene(new Scene(gr)); vbox = new VBox(); vbox.setStyle("-fx-border-color: grey"); gr.getChildren().add(vbox); stage.setVisible(true); setup(); } public void setup() { Circle c1 = new Circle(20); Circle c2 = new Circle(20); Circle c3 = new Circle(20); c1.setCursor(Cursor.OPEN_HAND); c2.setCursor(Cursor.CLOSED_HAND); c3.setCursor(Cursor.HAND); vbox.getChildren().add(c1); vbox.getChildren().add(c2); vbox.getChildren().add(c3); } public static void main(String[] args) { javafx.application.Launcher.launch(ShortAppWithoutDependencies.class, args); } }