Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java get mouseover tooltip text

Tags:

java

tooltip

Is it possible in java (or any other language that you know of) to get tool tip text (on mouseover). For example you mouseover something in an arbitrary application and a tiny tooltip pops up with some info. Can this be returned as a string to a program. It seems possible, i dont see why not but im no expert. Any help would be appreciated. Thanks.

like image 720
b9703 Avatar asked Feb 07 '23 03:02

b9703


1 Answers

All the classes which extend JComponent have these functionalities.

  • You do :

    comp.setToolTipText("HEY!");
    

    to set the text.

  • You do :

    String tt = comp.getToolTipText();
    

    to get the text.

like image 200
dryairship Avatar answered Feb 16 '23 04:02

dryairship