Create a JavaFX application named ISUTiger.java to display the following screen.
ID: 652136 • Letter: C
Question
Create a JavaFX application named ISUTiger.java to display the following screen.
The tiger image should be centered on the screen.
The "BENGALS" letters should be displayed as shown in an arc above the tiger image.
HINT: Recall from trigonometry that the x and y coordinates of a point on a circle can be found with the following functions:
x = r*cos?
y = r*sin?
Use modular programming techniques: Create separate modules to
1. Add the image to the pane
2. Add the BENGALS logo to the pane
3. Add the trailer logo to the pane
Name the java class: ISUTiger
Explanation / Answer
import javafx.application.Application; import javafx.scene.Scene; import javafx.stage.Stage; public class ISUTiger extends Application { public static void main(String[] args) { launch(args); } public void start(Stage primaryStage) throws Exception { primaryStage.setTitle("Starting FX"); TitledPane tp = new TitledPane("BENGALS")); primaryStage.setScene(new Scene(new Panel(), 590, 390)); primaryStage.setResizable(false); primaryStage.centerOnScreen(); primaryStage.show(); } } import javafx.scene.control.Label; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.Pane; public class Panel extends Pane { Image labelImage = new Image(getClass().getResourceAsStream("image.jpg")); Image labelImage_ = new Image(getClass().getResourceAsStream("trailer_logo.jpg")); private Label label1 = new Label(); private Label label2 = new Label(); public Panel() { label1.relocate(524, 280); label1.setGraphic(new ImageView(labelImage)); this.getChildren().add(label1); label2.relocate(250, 200); label2.setGraphic(new ImageView(labelImage_)); this.getChildren().add(label2); } } }