I have a Java class that extends JTextField and covers it with a JLayer (new Java 1.7 feature) in order to display custom graphical effects in certain conditions. Without the JLayer it is easy enough to add a tooltip using setToolTipText(String). But with the JLayer in place, nothing happens when I hold my mouse over the box. Perhaps it is blocking the mouse-over event? I also tried calling setToolTipText() on the JLayer object itself but it didn't make any difference. So how can I get the tooltip to work?
Asked
Active
Viewed 225 times
1 Answers
2
Did you try overriding getToolTipText and return getView().getToolTipText()? Doubt it will help though.

Joop Eggen
- 107,315
- 7
- 83
- 138
-
Calling getView().setToolTipText() on the JLayer did the trick. Thanks! – Mike O Dec 01 '11 at 15:37
-