/home/caleb/ASDV-Java/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/ShowRectangle.java |
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt
nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java
package javafx_calebfontenot;
import javafx.application.Application;
import static javafx.application.Application.launch;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;
@author
public class ShowRectangle extends Application {
@Override
public void start(Stage primaryStage)
{
Pane pane = new Pane();
Scene scene = new Scene(pane, 300, 200);
primaryStage.setScene(scene);
primaryStage.show();
Rectangle r = new Rectangle(30, 30, 88, 44);
r.setX(30);
r.setY(30);
r.setStroke(Color.BLUE);
r.setFill(Color.RED);
pane.getChildren().add(r);
}
public static void main(String[] args)
{
launch(args);
}
}