/home/caleb/ASDV-Java/Semester 3/Assignments/lab2_FX2_F22_part1/src/lab2_fx2_f22_part1/Image1.java |
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt
nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java
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;
public class Image1 extends Application {
@Override
public void start(Stage primaryStage) throws Exception
{
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);
Scene scene = new Scene(pane);
primaryStage.setTitle("Flags");
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args)
{
launch(args);
}
}