Results 1 to 3 of 3
Thread: Dragging JLabel
- 09-22-2009, 03:57 PM #1
Member
- Join Date
- Sep 2009
- Posts
- 10
- Rep Power
- 0
Dragging JLabel
I am having a problem with dragging a jLabel on a JPanel. I used the method mousedragged<code>public void MouseDragged(MouseEvent e){jLabel.setLocation(e.getX(),e.getY());}</code>that's all i used but i what i saw was that when i drag the label, i see double label moving. I decided to add the code<code>Thread.currentThread(100)</code> , then i got just a label put the dragging is not yet okay. Some one said i could use a timer to take care of it but i don't know how. Please help me out.
- 09-22-2009, 04:31 PM #2
Senior Member
- Join Date
- Jul 2009
- Posts
- 1,158
- Rep Power
- 5
Well, I can't enter a link but you can search the web for my "tips4java" website and then search for the "Moving Windows" entry which can also be used to move components.
- 09-22-2009, 07:19 PM #3
Similar Threads
-
Dragging Boxes
By anilanar in forum New To JavaReplies: 8Last Post: 09-05-2009, 09:23 PM -
Help with creating, selecting and dragging a circle
By Jolee in forum Java 2DReplies: 3Last Post: 08-20-2009, 02:04 AM -
Problems dragging sql server 2008 tables to design viewer in NetBeans 6.5
By mosbos in forum NetBeansReplies: 0Last Post: 04-05-2009, 01:22 PM -
Limiting the Dragging area
By Preethi in forum New To JavaReplies: 1Last Post: 07-30-2008, 03:51 PM -
Scaling-ache and mouse dragging
By willemjav in forum Java AppletsReplies: 19Last Post: 07-19-2008, 12:17 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks