/home/caleb/ASDV-Java/Semester 3/Assignments/lab2_FX2_F22_part1/src/lab2_fx2_f22_part1/Image1.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.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.*;
import javafx.stage.Stage;

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

    @Override // Override the start method in the Application class
    public void start(Stage primaryStage) throws Exception
    {
        // Create a pane to hold the image views
        Pane pane = new HBox(10);
        pane.setPadding(new Insets(5, 5, 5, 5));
        Image image = new Image("image/us.gif");
        pane.getChildren().add(new ImageView(image));
        
        ImageView imageView1 = new ImageView(image);
        imageView1.setFitHeight(100);
        imageView1.setFitWidth(100);
        pane.getChildren().add(imageView1);
        
        ImageView imageView2 = new ImageView(image);
        imageView2.setRotate(90.0);
        pane.getChildren().add(imageView2);
        
        //Create a scene and place it in the stage
        Scene scene = new Scene(pane);
        primaryStage.setTitle("Flags"); // Set the stage title
        primaryStage.setScene(scene); // Place the scene in the stage
        primaryStage.show(); // Display the stage
        
    }
    public static void main(String[] args)
    {
        launch(args);
    }
}