I am wondering if it is possible to show a “hint text” on mouseover in Java Graphics2d. something like:
Graphics2D g;
g.fillRect(0, 0, w, h);
g.showhint("Show this hint if mouse is over the area:",0,0,10,20); ?????
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re referring to some arbitrary painted text, then sure:
repaint()If you’re referring to tooltips: Yes, it is possible too.
Here is an excerpt from the official tutorial:
The latter approach seems even trivial to implement.