JavaFX Ellipse set fill color
import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.scene.paint.Color; import javafx.scene.shape.Ellipse; import javafx.stage.Stage; public class Main extends Application { @Override//from www . j a v a2 s . c o m public void start(Stage primaryStage) { // Create a pane Pane pane = new Pane(); // Create an ellipse and set its properties Ellipse ellipse = new Ellipse(75, 40, 50, 20); ellipse.setStroke(Color.BLACK); ellipse.setFill(Color.WHITE); // Place nodes in pane pane.getChildren().addAll(ellipse); // Create a scene and place it in the stage Scene scene = new Scene(pane, 150, 200); primaryStage.setTitle("java2s.com"); primaryStage.setScene(scene); primaryStage.show(); } }