Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Swing / AWT / SWT and the fly likes Moveable tooltips Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Moveable tooltips" Watch "Moveable tooltips" New topic

Moveable tooltips

N Fisher

Joined: Sep 21, 2004
Posts: 5
I want to be able to create a tooltip which moves with the mouse, rather than staying static, as in this example here:

Am I best doing this by using a mouseMotionListener and moving the tooltip to wherever the mouse position is? What would be the code exactly?

Thanks in advance.
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
N Fisher

Joined: Sep 21, 2004
Posts: 5
Thanks very much for the code!!

I will try it when I get home tonight, but it looks like it will do exactly what I want it to.


Have you tried LearnNowOnline?
subject: Moveable tooltips