Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

tooltips  RSS feed

 
dubey vandana
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
hv you all ever seen in powerpoint, the option of having callout kind of thing which is generally used for writing short description of some menuitems. i want the same to be implemented in java.
i used following to do so:
UIManager.put("ToolTip.foreground", new ColorUIResource(Color.black));
UIManager.put("ToolTip.background", new ColorUIResource(toolclr));
UIManager.put("ToolTip.font", new Font("SansSerif",Font.BOLD,10));
config.setToolTipText("It describes order of Neural Network algorithims");
but actually the tooltips have disadvantage of being very short. how to write 3 or 4 lines tooltips???
Is there any other way? Pl. explain with some example..
rasap
thanx.
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use html.

String toolTip = new String("<html> one <p> two <p> three</html>");
[ January 31, 2002: Message edited by: Paul Stevens ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!