Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / November 2003

Tip: Looking for answers? Try searching our database.

How link a drawing line to JLabel?

Thread view: 
James - 24 Nov 2003 05:44 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 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.