Posts

Showing posts with the label javafx

JavaFX Day - 1

Image
JavaFX 2D shapes The package javafx.scene.shape containes various classes that can be used to make 2D shapes in our JavaFX application. Using javaFX we can create 2D shapes like Line, Rectangle, Circle, Ellipse, Polygon, Arc, etc. How to create any 2D shape in JavaFX? create an object of respective class : Line line1 = new Line(); Set the required properties using respective methods. Add class object to Group layout using Group root = new Group(); root.getChildren().add(line1); The reason behind using Group layout: It is a container component in which every child components are positioned at 0,0; Shape Class Line javafx.scene.shape.Line Rectangle javafx.scene.shape.Rectangle Ellipse javafx.scene.shape.Ellipse Arc javafx.scene.shape.Arc Circle ...

YouTube