Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Customising JToolTip / using JFrame?

 
Trisha Murphy
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have a Java Application and I want to create a tooltip similar to what you see on some windows applications when you click on a link. It looks like a tooltip but the box doesn't go away until you click on an area outside it or if you press the x button in the top right corner.

Can someone put me in the right direction please? I had a look into Tooltips but couldn't see anything other than changing the background / foreground and multiline tips.
Should I use a JFrame and have a mouselistener on the application?
How do I make it look more like a tooltip than a Frame? i.e. remove the title bar and the minimise / maximise buttons?

all suggestions appreciated!

thanks!
Trisg
 
Tommy Greenberg
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only other thing I can think of is a JPanel. You might want to start there. I am not sure what your trying to do with the whole tool tip thing, but the JPanel is a blank panel with no min, max, or close buttons. Also, i am not sure if you know this but all the extend classes of JComponent have a setToolTip() method, which is probably a lot eaiser than writing one yourself.
 
clio katz
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
two suggestions:

(1) have you looked at Sun's JavaHelp? I haven't used it, it looks involved, but might work if you need a heavy-duty/long-term solution.

(2) Daniel Brookshier wrote an interesting approach to "Building a Status-Bar Help Bean". It's interesting reading even if you don't go that route. The design could be adapted for another component like a Dialog...

Good Luck!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic