how to randomize JLabel array? and how to put image in JLabel array?

Recommended Answers

All 2 Replies

how to randomize JLabel array? and how to put image in JLabel array?

Define what you want to do abit more clearly please? What do you mean by "randomize a JLabel array" ? Also do you want an image to be displayed with a JLabel? Is that right?

What do you mean, exactly, by randomise?
To put an image in a JLabel create your image as an ImageIcon, then use JLabel's setIcon method. The API doc has all the details.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.