?
Solved

Tooltip duration

Posted on 2002-06-20
3
Medium Priority
?
1,667 Views
Last Modified: 2007-11-27
Hey all,

does anybody know if there is a way to set the duration a tooltip stays on a swing gui?  I have some custom components that I'm using the built in tooltip functionality of JComponent (ie using setTooltipText) but I don't like the fact that the tip only stays for a few seconds.  What I'd really like is the ability to have it stay up until they move the mouse off of the component.  Any thoughts on this?

Thanks.
0
Comment
Question by:mzimmer74
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Expert Comment

by:pran071199
ID: 7096276
Add this line to your Application
    ToolTipManager.sharedInstance().setDismissDelay(delaymsecs);

where delaymsecs is the number of milliseconds to delay  before taking away the tooltip
 
0
 
LVL 1

Accepted Solution

by:
pran071199 earned 200 total points
ID: 7096316
Add this line to your Application
   ToolTipManager.sharedInstance().setDismissDelay(delaymsecs);

where delaymsecs is the number of milliseconds to delay  before taking away the tooltip.

You may not be able to display tooltip until mouse is moved off. But you can give a large delay so that the user can properly read it.



0
 
LVL 2

Author Comment

by:mzimmer74
ID: 7096932
Thanks, that solved my problem well enough.  However, do you know if there is any way to make it so some tooltips have different durations?  I'd really like to make only the tool tips in one portion of my program have long durations and the rest have the standard time.  Is this possible or not?  Thanks.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question