I am having a bit of an issue right now. Is there any simple way to swap the positions of two elements in a java swing program.
Example:
I have labels label1, and label2.
Label1 is added to the panel with its bounds set (not layout manager) something like this:
label1.setBounds(300,200,150,150);
label 2 is added similarly:
label2.setbounds(500,500,150,150);
Assuming that I wanted to swap the positions of label 1 and label 2, would there be any way to do that? Thanks!
You mean different from: