• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set next line in ToolTip

 
Kriti Garg
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

i have set tooltip for each item of the JList.

everything is ok.

But the problem with setToolTipText(String s) method is that it
shows everything in one single line ,how long it may be.

i tried using '\n' after some characters but it doesnot worked

Can anybody help me out.
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use HTML markup in the tooltips, so you could have

<HTML>Something<br>somethingelse</HTML>

(Where <br> is the new line)

Cheers,
Rachel
 
Kriti Garg
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks it worked!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic