-
Jlabel issues
I have two JLabels. One of them is a large image.
When I click on the smaller label, it is 'glued' to the mouse. Meaning it moves to where ever the mouse pointer takes it.
When the mouse is clicked again, the label is 'unglued' and stays where it was dropped.
The idea is that this small label needs to be dropped onto the large label.
The problem is that the small label is behind the large label. I cant seem to bring it to the front.
I'm not using a layout manager (setLayout(null)).
Any ideas?
Thanks.
-
Re: Jlabel issues
I believe this is what you're looking for: Container (Java Platform SE 6)
But you might be better off using a GlassPane.
-
Re: Jlabel issues
The Container works... thanks!
I'm pretty new to the swing side of Java. The only way I could get the small label to move with the mouse was to call setLayout(null).
I'll look int the GlassPane.
Thanks again.