I had a JLabel showing in JPanel, then I draw a line near it.
What I had done is when user click & drag the JLabel, the JLabel will move
to location that user finally release the mouse. And now I dunno how to link
the drawing line to the JLabel so that when user move the JLabel, the line
always follow it.(I mean, the line maybe expand the length or rotate the
position so that it can still link to JLabel)
Harald Hein - 24 Nov 2003 19:01 GMT
> I had a JLabel showing in JPanel, then I draw a line near it.
> What I had done is when user click & drag the JLabel, the JLabel
[quoted text clipped - 3 lines]
> maybe expand the length or rotate the position so that it can
> still link to JLabel)
Throw away the JLabel. Mixing componens like JLabel with drawings is a
stupid idea. Learn about the Java 2D API and draw all your stuff with
that API.