0
votes

I have a few radio buttons and then a checkbox, I have tooltip's for the radio buttons but not the checkbox. Which works okay, unless I get a radio to display it's tool tip text and then quickly move to the checkbox, before the tip disappears, and now I have my mouse on the checkbox but it is displaying the tooltip for the previously moused over radio button.

I tried setting a blank ("") tool tip for the checkbox, which works okay except that it displayed a very small tooltip square.

Is there anyway to either force the previous tooltip to go away or to properly set a nothing tooltip for the checkbox?

    radioButtonsetText("text");
    radioButton.setToolTipText("tooltip text");
    checkBox.setText("text");
    checkBox.setToolTipText("");
1
Got a runnable example which demonstrates your problem? This is not a code dump, but an example of what you are doing which highlights the problem you are having. This will result in less confusion and better responses - MadProgrammer

1 Answers

0
votes

or to properly set a nothing tooltip for the checkbox?

Components don't have a tooltip by default. So don't set the tooltip and your won't have a problem.

If you set the text and want to remove it the try using:

component.setToolTipText(null);