Results 1 to 3 of 3

Thread: Forcing Tooltips to be shown

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    UK
    Posts
    222

    Forcing Tooltips to be shown

    Hello, this might be simple, i don't know..

    IS there a way of making all the tooltips on component display at once, and have them remained displayed... maybe so i can toggle them on and off easily?! I can't find anyhting onthe SUN java website, just wondered if anyone had done a similair thing?!

    Andy

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    I know that typical Windows programs share a single tool-tip window for all tool-tips. If Java programs do the same, you can't display them all at once.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Posted by Andy_Hollywood
    IS there a way of making all the tooltips on component display at once, and have them remained displayed... maybe so i can toggle them on and off easily?!
    Im pretty sure that Swing provides no way of doing this.

    First here is a brief overview. I need to jog my memory also.

    JComponents do not manage tooltips by themselves(a component gets help from the ToolTipManager class). What the ToolTipManager class actually does is continually scan for mouse events on components that have tooltips. If the pointer has not left the components region in 3/4 of a second a tool tip is drawn at a preset location near the component. If the pointer moves out of the region for 1/2 second the tooltip dissapears.

    Now instead of using the methods that JComponent provides you can use a JToolTip object that Swing provides. You usually want to declare your own JToolTip object and override the createToolTip() method of JComponent.

    Now as i said i don't think there is a way to do this because i see no functionality that the JComponent or ToolTipManager classes provide. Using various getter and setter methods from the ToolTipManager class you can reset the delays the determine when the ToolTips pop up and leave but that's about it.

Posting Permissions

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



Click Here to Expand Forum to Full Width