Question: code in java please,, here is a copy of my code for the last lab and a screenshot of the quastation please add the animation
code in java please,, here is a copy of my code for the last lab and a screenshot of the quastation please add the animation to it import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import javafx.stage.Stage; public class Lab extends Application @Override public void startStage stage Pane pane new HBox; ImageView imageView new ImageView; Image images new Image; images new ImageC:UsersyouDownloadscanvaphotoeditorjpg; images new ImageC:UsersyouDownloadsdownloadjpeg"; images new ImageC:UsersyouPicturesScreenshotsScreenshotpng; imageView.setFitWidth; set the width of the image imageView.setPreserveRatiotrue; set the height of the image imageView.setImageimagesfirst; set the image to the image view when you reach the end of the array disable the next button Button next new ButtonNext; next.setOnActione iffirst images.length first; imageView.setImageimagesfirst; else next.setDisabletrue; ; when you reach the beginning of the array disable the previous button Button previous new ButtonPrevious; previous.setOnActione iffirst first; imageView.setImageimagesfirst; else previous.setDisabletrue; ; Scene scene new Scenepane; set the size of the scene pane.getChildrenaddAllnextimageView,previous; add the buttons and image view to the layout stage.setTitleLab; stage.setScenescene; stage.show; int first; public static void mainString args launchargs; Objectives: In this lab, the following topic will be covered: Animation Task Add to the previous lab a button slideshow that displays an image from an array of images then after two seconds the next image is displayed and so on When you reach the last image, reverse the direction. When you reach the first image, reverse the direction.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
