• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in Tooltip  RSS feed

 
priya gnana
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a drawn an array of Rectangle.Now,i want to add tooltip to that,to display some string that i have it in another array.So in mouseMoved method i set the tooltip,by checking the condition,if the mouse comes over the rectangle the tooltip should display,now the problem is even after coming out of the rectangle region the tooltip is getting displayed,how to getride of the problem,can anyone help me.please
 
Campbell Ritchie
Sheriff
Posts: 55362
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check your private messages about an important administrative matter.
 
priya gnana
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any help,please...
 
Rob Spoor
Sheriff
Posts: 21052
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will you please read your private messages. Apparently you haven't done that yet.
 
priya gnana
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any suggestions,please.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by priya gnana:
Any suggestions,please.


Difficult to say without seeing your mouse listener code.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The mouseMoved method needs to check for whether 1) the mouse enters the rectangle (so that the tooltip should be displayed), and 2) the mouse leaves the rectangle (so that the tooltip should no longer be displayed). These two events should set/unset a boolean field, so that the paintComponents method can draw or not draw the tooltip based on that. How are you handling that? It sounds as if you're only handling one case, but not the other.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!