/home/caleb/ASDV-Java/Semester 3/Assignments/lab2_FX2_F22_part1/src/lab2_fx2_f22_part1/FontDemo2.java
/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package lab2_fx2_f22_part1;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.scene.text.*;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.stage.Stage;

/**
 *
 * @author caleb
 */
public class FontDemo2 extends Application {
    @Override // Override the start method in the Application class
    public void start(Stage primaryStage) {
        // Create a pane to hold the circle and label
        Pane pane = new StackPane();
        // Create a scene and place it in the stage
        Scene scene = new Scene(pane);
        // Add the scene to the stage
        primaryStage.setScene(scene);
        //Set the stage title
        primaryStage.setTitle("FontDemo2");
        
        // Create Node circle and add to the Pane
        Circle circle = new Circle();
        circle.setRadius(300);
        circle.setStroke(Color.BLACK);
        circle.setFill(Color.GRAY);
        //new Color(0.9, 0.1, 0.1, 0.1)
        // Add circle to the pane
        pane.getChildren().add(circle);
        
        // Create node label and add to Pane
        Label label = new Label("JavaFX");
        label.setRotate(90.0);
        // Font created via static method font() and set the font into the label
        label.setFont(Font.font("Comic Sans MS",
                               FontWeight.NORMAL, FontPosture.ITALIC, 96));
        label.setTextFill(Color.YELLOW);
        pane.getChildren().add(label);
        // Display the stage
        primaryStage.show();
    }
    public static void main(String[] args)
    {
        launch(args);
    }
}