Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javafxapplication12;
- import javafx.application.Application;
- import javafx.scene.Scene;
- import javafx.stage.Stage;
- import javafx.scene.layout.Pane;
- import javafx.scene.paint.Color;
- import javafx.scene.shape.Circle;
- public class CirclePosition extends Application {
- @Override
- public void start(Stage stage) {
- stage.setTitle("Codecrawl.com");
- Pane pane = new Pane();
- Scene scene = new Scene(pane, 500, 400);
- stage.setScene(scene);
- pane.setStyle("-fx-background-color: lightgray;");
- Circle circle = new Circle();
- circle.setCenterX(120);
- circle.setCenterY(250);
- circle.setRadius(50);
- circle.setFill(Color.CORNFLOWERBLUE);
- pane.getChildren().add(circle);
- stage.show();
- }
- public static void main(String[] args) {
- launch(args);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement