1  import javafx.application.Application;
  2  import javafx.scene.Scene;
  3  import javafx.scene.layout.Pane;
  4  import javafx.scene.paint.Color;
  5  import javafx.scene.shape.Circle;
  6  import javafx.stage.Stage;
  7  
  8  public class ShowCircle extends Application {
  9    @Override // Override the start method in the Application class
 10    public void start(Stage primaryStage) {
 11      // Create a circle and set its properties
 12      Circle circle = new Circle();
 13      circle.setCenterX(100);
 14      circle.setCenterY(100);
 15      circle.setRadius(50);
 16      circle.setStroke(Color.BLACK); // Set circle stroke color
 17      circle.setFill(Color.WHITE);
 18      
 19      // Create a pane to hold the circle 
 20      Pane pane = new Pane();
 21      pane.getChildren().add(circle);
 22      
 23      // Create a scene and place it in the stage
 24      Scene scene = new Scene(pane, 200, 200);
 25      primaryStage.setTitle("ShowCircle"); // Set the stage title
 26      primaryStage.setScene(scene); // Place the scene in the stage
 27      primaryStage.show(); // Display the stage
 28    }
 29    
 30    /**
 31     * The main method is only needed for the IDE with limited
 32     * JavaFX support. Not needed for running from the command line.
 33     */
 34    public static void main(String[] args) {
 35      launch(args);
 36    }
 37  }