Is there a way to add(labels) in a JFrame window RANDOM?
I use FlowLayout and I have:
If I write somthing like this: add(l3);add(l4);add(l1);add(l2); changing series of images.. That's I want... to add the labels with different position every time..
If not, is there a way to put with different row (random) the images in labels?
I have this way to put the images:
imageOfLabel1 = imageOfLabel2 = "im1.jpg";
imageOfLabel3 = imageOfLabel4 = "im2.jpg";
what you want to do can be done, no problem. you need to think about the problem some more. store the images in a collection of some sort (ArrayList, etc). then have a method which randomly selects one of them.
just add your JLabels once(in the constructor usually). reassign what each displays.