How to change the jtooltip timers for 1 component.

Posted by i30817 on Stack Overflow See other posts from Stack Overflow or by i30817
Published on 2010-03-13T00:04:28Z Indexed on 2010/03/13 0:07 UTC
Read the original article Hit count: 153

Filed under:
|

I have a component where i want to display a custom jtooltip. That is easy, just change the getTooltip method. Similar for location and text.

However i also want to change the timers. The tooltip should always be displayed if the mouse is over a cellrenderer of the component. If it leaves all of those it should be turned invisible. I know that i can use TooltipManager to control the times globally. But the best solution is probably to just shortcircut that and display the tooltip myself with a mouselistener. However when i tried to do that (unregister the component in TooltipManager and setting the tooltip visible, with text and in the correct position, in a mouse listener) the tooltip never showed at all. What am i doing wrong?

© Stack Overflow or respective owner

Related posts about java

Related posts about swing