Example usage for javafx.scene.shape Polyline Polyline

List of usage examples for javafx.scene.shape Polyline Polyline

Introduction

In this page you can find the example usage for javafx.scene.shape Polyline Polyline.

Prototype

public Polyline() 

Source Link

Document

Creates an empty instance of Polyline.

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    Group root = new Group();
    Scene scene = new Scene(root, 260, 80);
    stage.setScene(scene);/*w  w  w .j a v  a2s.co  m*/

    Group g = new Group();

    Polyline polyline = new Polyline();
    polyline.getPoints().addAll(new Double[] { 0.0, 0.0, 20.0, 10.0, 10.0, 20.0 });

    g.getChildren().add(polyline);

    scene.setRoot(g);
    stage.show();
}