Ellipse_Circle1
  • Ellipse Constructors:
    • Ellipse​() Creates an empty instance of Ellipse.
    • Ellipse​(double radiusX, double radiusY) Creates an instance of Ellipse of the given size.
    • Ellipse​(double centerX, double centerY, double radiusX, double radiusY) Creates an instance of Ellipse of the given position and size.
  • Circle
     
    • Circle​() Creates an empty instance of Circle.
    • Circle​(double radius) Creates a new instance of Circle with a specified radius.
    • Circle​(double centerX, double centerY, double radius) Creates a new instance of Circle with a specified position and radius.
    •  Circle​(double centerX, double centerY, double radius, Paint​fill) Creates a new instance of Circle with a specified position, radius and fill color.
    •  Circle​(double radius, Paint​fill) Creates a new instance of Circle with a specified radius and fill color.
Using Pane as a container:

 

Code :

package javafxtemplate1;
//Recursion_BindContent_ListView1
//textProperty().addListener Listview Label
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.chart.CategoryAxis;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Ellipse;
import javafx.stage.Stage;


/**
*
* @author Manas9
*/
public class JavaFXTemplate1 extends Application {
//ImageView imageView = new ImageView();
//Button clearBtn = new Button("Clear Image");
//Node imagenode;Label label1 =new Label("L1");
Scene scene;Pane pane1 = new Pane();
HBox hb1 = new HBox();
@Override
public void start(Stage primaryStage) throws Exception {

primaryStage.setTitle("Line Chart Sample");
//Circle(double centerX, double centerY, double radius)
//Ellipse(double centerX, double centerY, double radius x,double radius y)
Circle circle1 = new Circle(250,250, 90, Color.GREEN);
//read more about the constructors
Ellipse ellipse1 = new Ellipse(100,100);
ellipse1.setFill(Color.LIGHTGRAY);
Ellipse ellipse2 = new Ellipse(150,50,50,50);
Ellipse ellipse3 = new Ellipse(100,50,10,100);
pane1.getChildren().addAll(circle1, ellipse1,ellipse2,ellipse3);
//hb1.getChildren().addAll(circle1, ellipse1,ellipse2,ellipse3);
Scene scene = new Scene(pane1,800,600);
//lineChart.getData().add(series);
primaryStage.setScene(scene);
primaryStage.show();
}

//


public static void main(String[] args) {
launch(args);
}
//
}

Runtime displays: