/home/caleb/ASDV-Java/Semester 3/Assignments/lab2_FX2_F22_part1/src/lab2_fx2_f22_part1/ShowText1.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.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.FontPosture;
import javafx.scene.text.FontWeight;
import javafx.scene.text.Text;
import javafx.stage.Stage;

/**
 *
 * @author caleb
 */
public class ShowText1 extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception {
        // Create a pane to hold the texts
        Pane pane = new Pane();
        pane.setPadding(new Insets(5, 5, 5, 5));
        Text text1 = new Text(40, 40, "Java programming is bold and beautiful!");
        
        text1.setFont(Font.font("Impact", FontWeight.BOLD,
                     FontPosture.ITALIC, 36));
        pane.getChildren().add(text1);
        
        Text text2 = new Text(60, 60, "Java Programming is fun\nand Challenging!");
        pane.getChildren().add(text2);
        
        Text text3 = new Text(10, 100, "C# Programming is not as beautiful as Java programming!\n Try it!");
        text3.setFill(Color.RED);
        text3.setUnderline(true);
        text3.setStrikethrough(true);
        text3.rotateProperty().add(90);
        pane.getChildren().add(text3);
        
        // Create a scene and place it in the stage
        Scene scene = new Scene(pane);
        primaryStage.setTitle("ShowText"); // Set the stage title
        primaryStage.setScene(scene); // Place the scene in the stage
        primaryStage.show();
    }
    public static void main(String[] args) {
        launch(args);
    }
}