Source Code : Fill Ellipse with Red stroke and Yellow Fill
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Fill Ellipse with Red stroke and Yellow Fill
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.effect.DropShadow;
import javafx.scene.effect.DropShadowBuilder;
import javafx.scene.paint.Color;
import javafx.scene.shape.*;
import javafx.stage.Stage;
public class Main extends Application {
public static void main(String[] args) {
Application.launch(args);
}
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("Shapes");
Group root = new Group();
Scene scene = new Scene(root, 300, 300, Color.WHITE);
Path path = new Path();
Ellipse bigCircle = EllipseBuilder.create()
.centerX(100)
.centerY(100)
.radiusX(50)
.radiusY(75/2)
.translateY(path.getBoundsInParent().getMaxY())
.strokeWidth(3)
.stroke(Color.RED)
.fill(Color.YELLOW)
.build();
root.getChildren().add(bigCircle);
primaryStage.setScene(scene);
primaryStage.show();
}
}
Thank with us