import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.canvas.Canvas; import javafx.scene.canvas.GraphicsContext; import javafx.scene.paint.Color; import javafx.scene.shape.ArcType; import javafx.stage.Stage; public class Joonis3 extends Application { Foorituli tuli1; public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) { stage.setTitle("Joonistusaken"); Group root = new Group(); Canvas canvas = new Canvas(300, 250); GraphicsContext gc = canvas.getGraphicsContext2D(); tuli1=new Foorituli(Color.RED, 50, 30, gc); tuli1.uusSeisund(1); root.getChildren().add(canvas); stage.setScene(new Scene(root)); stage.show(); } }