Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 952
mindmaster Avatar asked Sep 28 '11 21:09

mindmaster


People also ask

What is tooltip text in Java Swing?

Tooltips are small windows of text that popup when the user leaves the mouse cursor over a component for a second or two. They are used to explain the functionality of the component. Tooltips are an integral part of Swing components. They can be specified by calling the setToolTipText method as shown below.

Which method is used to add tooltip text to almost all components of Java Swing?

We can add tooltip text to almost all the components of Java Swing by using the following method setToolTipText(String s). This method sets the tooltip of the component to the specified string s.

In which feature name of the tool appears when we roll mouse over any tool?

A tooltip may refer to any of the following: 1. Alternatively known as a balloon, help balloon, flyover help, or ScreenTip, a Tooltip is a text description near an object. The tooltip is displayed when the user hovers the mouse cursor over the object.


1 Answers

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.

enter image description here

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.

like image 186
Costis Aivalis Avatar answered Sep 28 '22 10:09

Costis Aivalis