Skip to main content

Problem with tooltip in nested component

1 reply [Last post]
luvarga
Offline
Joined: 2008-06-10
Points: 0

Hi.

I have JButton object several time nested into jpanels and than nested into jTable. I was inspired by this tutorial http://www.devx.com/getHelpOn/10MinuteSolution/20425 and I adapted it to jpanel class. Problem is, that even thougt the button is receiving move events and other mouse events, no tooltip appear after mouse stop over that button.

Problem is after first nesting. The jpanel which is in table is able to show his own tooltip, but any nested component in it, isnt able to do that.

my exmaple could be found on: https://dawn.ynet.sk/~luvar/temp/JTableButtonTest.java Try to stand on button two, and than on button one. (button one is encapsulated in jpanel)

PS: i tryed to solve this problem for about four hours, but nowhere is detailed described the mechanism of how tooltips works. ToolTipManager is too complex probably for me.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
luvarga
Offline
Joined: 2008-06-10
Points: 0

Oki. I will answer my question. Answer is too simple:

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

Agains sorry for spam, Ill buy some t-shirt with "RTFM" title.