File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Order of adding components Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Order of adding components" Watch "Order of adding components" New topic

Order of adding components

Priya Kannan
Ranch Hand

Joined: Jan 19, 2001
Posts: 72
I'm developing a drag and drop application. I drag labels(with icons set) by changing their x & y positions using MouseMotionListener. I add this array of labels to a panel in order. The problem is when I drag the labels, the labels that are added last, go below the ones that were added first(due to the order in which they were added). They don't overlap. I want all labels irrespective of their order of addition to the panel, to overlap all other labels when they are dragged individually.
Please help.
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Since this is posted in Intermediate, I am closing it here.

"JavaRanch, where the deer and the Certified play" - David O'Meara
I agree. Here's the link:
subject: Order of adding components
It's not a secret anymore!