jLabel floating with mouse

i need to create a label floating just below the mouse cursor when a mouseDragged event listener launches. it must be like the ones color pickers have. i can create a simple one but the thing is it can not be viewed on top of a jtree inside a jScrollPane. it just floats beneath it.

Thanks.

[303 byte] By [Erdal_YILMAZa] at [2007-11-27 11:07:54]
# 1

> it must be like the ones color pickers have.

"How to Use Tool Tips"

http://java.sun.com/docs/books/tutorial/uiswing/components/tooltip.html

camickra at 2007-7-29 13:25:03 > top of Java-index,Desktop,Core GUI APIs...
# 2

thanks but i need it with a drag and drop event so it can float between panels.

infact the thing i need to do is to drag a jTree node to another jTextArea and drop. but while dragging i need an info-panel to display selected node's bounded data in a database and float with mouse until dropped. it is important for me to show info-panel while dragging between panels or other JFrame components.

Thanx

Message was edited by:

Erdal YILMAZ

Erdal_YILMAZa at 2007-7-29 13:25:03 > top of Java-index,Desktop,Core GUI APIs...
# 3

> thanks but i need it with a drag and drop event so it

> can float between panels.

then use java.awt.dnd.

drag and drop in java.

using dnd:

http://java.sun.com/docs/books/tutorial/uiswing/dnd/intro.html

http://www.javaworld.com/javaworld/jw-03-1999/jw-03-dragndrop.html

Yannixa at 2007-7-29 13:25:03 > top of Java-index,Desktop,Core GUI APIs...