package test.scenegraph.app; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.RadioButton; import javafx.scene.control.Slider; import javafx.scene.layout.Pane; import javafx.stage.Stage; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.shape.Polygon; import javafx.scene.text.Font; 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(500); stage.setHeight(500); Slider sl = new Slider(0,100,0); p.getChildren().add(sl); Polygon node = new Polygon(); node.getPoints().addAll(new Double[]{ 0.0, 0.0, 120.0, 10.0, 10.0, 120.0}); node.setFill(Color.LIGHTGREEN); node.setStroke(Color.DARKGREEN); node.getStrokeDashArray().add(10.); node.getStrokeDashArray().add(8.); node.strokeDashOffsetProperty().bind(sl.valueProperty()); p.getChildren().add(node); stage.setVisible(true); } public static void main(String args[]) { Application.launch(ShortAppWithoutDependencies5111.class, args); } }