Best way to drag and drop a whole JTextArea?



I'm an old C++ programmer fairly new to Java. I'm writing a little ap
as a learning exercise, but I can't figure how to do something I'd like
to do.

Right now I have a JLayeredPane that I can import text and images into
from a menu selection. I put the text or image in a JLabel and add it
to the JLayerdPane. Then I set it up to be able to select any one of
the JLabel's by clicking on it and then drag it to a different place on
the layered pane.

Now I thought I'd make the JLabels with text be editable, so I replaced
them with JTextAreas. Problem is, I can't figure out how to drag and
drop a whole JTextArea so I can move it around like I did the JLabels.
I can set it to be not editable, but that doesn't seem to solve the
problem, since it's still not draggable. If this were C++ I'd just
throw more ugly code at the problem, but I'd like to learn to do it the
right way.

Any suggestions how to approach this problem?

--gary

.



Relevant Pages