1

Is there a way to disable Tooltip display in Swing application (JRE6+, Motif look and feel) without changing the source code?

I have a rolled-out application that, in one instance, has severe display problems when tooltips on JTable are displayed. Essentially, the entire table wants to repaint and due to some other problems the repaint is slow enough to present severe flickering. For an immediate workaround, I cannot change the rolled out jars. The only solution I can imagine right now would be to find a property I can set from command line that disables tooltips or at least significantly increases the initial and reshow delays.

Is there any such property?

Mike Adler
  • 1,199
  • 9
  • 24
  • `JTable` should only render visible cells; please edit your question to include an [mcve](http://stackoverflow.com/help/mcve) that shows how you specify tooltips and exhibits the problem you describe; this will allow others to report potentially helpful findings; [profiling](http://stackoverflow.com/q/2064427/230513) may be illuminating. – trashgod Aug 01 '14 at 10:57
  • That was only background information. We have since found and eliminated the problem. But on this one system we cannot simply deploy a fixed version. I had some hopes for the TooltipManager.enableToolTipMode property, but that seems to lead nowhere. Currently investigating if I might just add the single fixed class file outside the jar and have it override the buggy version within. It's brutal either way. – Mike Adler Aug 01 '14 at 11:08

1 Answers1

3

See the class ToolTipManager. You can disable all the tooltips in your application. So you need a new jar with one little class which provide a proxy to your target jar.

Something like this:

public class ProxyLauncher {
    public static void main(String[] args) {
        ToolTipManager.sharedInstance().setEnabled(false);
        // launch your application:
        // MyApplication.main(args);
    }
}
Sergiy Medvynskyy
  • 11,160
  • 1
  • 32
  • 48