Question
Create a JavaFX application named ShowRandomCards that generates a picture with one randomly selected card from a standard card deck(52 cars and two jokers). Use
Create a JavaFX application named ShowRandomCards that generates a picture with one randomly selected card from a standard card deck(52 cars and two jokers). Use JavaFX application. I believe it is JDK 8
The following is an example output with the picture being the American flag.
The file of image:
It is flag6.gif ,but I am not sure how to send the attachment. You can pretend and use "flag6.gif.
Hint:
To generate a random number between 1 and 54:
int num1;
num1 = 1+(int) (Math.random() * 54);
To setup the path of the picture file:
String str = "image/card/" + num1 + ".png";
To rotate a picture:
Image image = new Image(new FileInputStream(str));
ImageView imageView = new ImageView(image);
imageView.setRotate(90);
X 0 - Showimage | ff t | * * * * | f * * * | + f f | E T * * * * | tt 4 | It it E i + + t + + + E | X 0 - Showimage | ff t | * * * * | f * * * | + f f | E T * * * * | tt 4 | It it E i + + t + + + E |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started