package test.scenegraph.app; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.shape.Polygon; import javafx.scene.shape.Polyline; import javafx.scene.text.Font; import javafx.scene.text.Text; import javafx.stage.Stage; public class ShortAppWithoutDependencies5111 extends Application { @Override public void start(Stage stage) { Pane p = new VBox(); Scene scene = new Scene(p); stage.setScene(scene); stage.setWidth(400); stage.setHeight(600); p.setTranslateX(50); p.setTranslateY(50); stage.show(); Double w = 200d; Double h = 300d; Double x0 = 30d; Double y0 = 30d; //Polygon polygon2 = new Polygon(); Polyline polygon2 = new Polyline(); polygon2.getPoints().addAll(new Double[]{ x0,y0, x0+w, y0, x0+w, y0+h, x0 }); p.getChildren().add(polygon2); } public static void main(String args[]) { Application.launch( args); } }