Results 1 to 3 of 3
  1. #1
    knuth is offline Member
    Join Date
    Sep 2009
    Posts
    8
    Rep Power
    0

    Default JPanel: Show Tooltip on click

    I have a shape on a JPanel, and when the user moves the mouse over it, I want to show a tooltip immediately. The tooltip should not be refreshed as long as the mouse is within the shape. When the mouse leaves the shape, the tooltip should disappear.
    Any ideas? When I use setToolTipText, the tooltip does not pop up immediately.

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

    Default

    You can set the default delay by using the ToolTipManager.

  3. #3
    knuth is offline Member
    Join Date
    Sep 2009
    Posts
    8
    Rep Power
    0

    Default

    Thx!
    ToolTipManager.sharedInstance().registerComponent( this);
    ToolTipManager.sharedInstance().setInitialDelay(0) ;
    Did the trick.

Similar Threads

  1. Tooltip
    By rohinideepthi in forum Java Applets
    Replies: 0
    Last Post: 09-26-2009, 08:29 AM
  2. How show a popWindow that have JPanel like parent
    By Wolverine in forum AWT / Swing
    Replies: 4
    Last Post: 05-23-2009, 08:59 AM
  3. Replies: 21
    Last Post: 08-01-2008, 11:13 AM
  4. tooltip
    By suman in forum New To Java
    Replies: 2
    Last Post: 07-31-2008, 01:57 PM
  5. netbeans 6.0 not show commpunent or show blank page
    By fahimaamir in forum NetBeans
    Replies: 1
    Last Post: 01-26-2008, 06:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •