Swing shows empty tooltips, how to disable this?
I'm creating a java Swing app and I'm new to that.
The problem is that when I move 开发者_开发技巧cursor to menu item, for example, it shows me an empty tooltip. Is there any way to disable this?
P.S. Using NetBeans, if it's important. Maybe it generated some odd code?
Go to the properties of the menu or menu item that displays the empty tooltip and choose tooltip. Then add "null" as a String value for setTooltipText. The empty tooltip will then dissapear.
If the toolTipText
property in the designer is bold (changed), you can just press the Reset to Default
button at the bottom of the above window, or even right-click on said property in the list and select Restore Default Value
.
I guess you're using the (now dead) Swing Application Framework. Netbeans automatically generates an entry in the properties file associated with each panel for the tooltip, with an empty value (instead of not generating the property at all if you leave the text box blank). Just remove the property in the properties file manually.
The lines looking like the following should be removed:
someAction.shortDescription=
精彩评论