This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Moveable tooltips

 
N Fisher
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to be able to create a tooltip which moves with the mouse, rather than staying static, as in this example here:

http://www.guistuff.com/tools/tooltip/tooltipgen2.cgi?navlinks=&titletextcolor=FFFFFF&titlefont=arial&titletextsize=8&contenttextcolor=000000&contentfont=arial&contenttextsize=8&titleareacolor=808080&contentareacolor=C0C0C0&tooltipwidth=150

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
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
N Fisher
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Cheers,


Nick
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic