Results 1 to 2 of 2
  1. #1
    stringargs is offline Member
    Join Date
    Nov 2010
    Posts
    9
    Rep Power
    0

    Exclamation manually trigger tooltips

    Any way to trigger the tooltips for JComponents whenever I want, and not just on mouseover event?

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

    Default

    Java Code:
    Action toolTipAction = component.getActionMap().get("postTip");
    
    if (toolTipAction != null)
    {
    	ActionEvent postTip = new ActionEvent(component, ActionEvent.ACTION_PERFORMED, "");
    	toolTipAction.actionPerformed( postTip );
    }

Similar Threads

  1. Display multiple tooltips at once
    By sverkaik in forum AWT / Swing
    Replies: 0
    Last Post: 02-07-2011, 05:00 PM
  2. Tooltips; More or less Swing related
    By JosAH in forum AWT / Swing
    Replies: 17
    Last Post: 06-25-2010, 02:03 AM
  3. Manually adding a component
    By djc in forum NetBeans
    Replies: 3
    Last Post: 04-01-2009, 11:51 AM
  4. tooltips for JTable column headers
    By fossildoc in forum AWT / Swing
    Replies: 2
    Last Post: 12-18-2008, 11:42 AM
  5. Handle exception manually
    By John_28 in forum New To Java
    Replies: 2
    Last Post: 06-05-2008, 11:26 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
  •