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.

Create a JavaFX application named ShowRandomCards that generates a picture with one

The file of image: randomly selected card from a standard card deck(52 cars and two jokers).

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!