JavaFX Ellipse set stroke 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 w w w .j a v a 2 s .com*/ 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(); } }