Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is it possible to display One JLabel Text in two lines  RSS feed

 
mohana konakanchi
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I need to display one JLabel text to display in two rows/lines.
I should not create two JLabels for two lines.
I tried putting "\n" inside
ex: JLabel("firstLine \n SecondLine");
But it's not working.
Any suggesions? or example code?
thanks in advance,
Mohana
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the multi line button thread. Same thing goes for labels. Use HTML.
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Yes it is possible. I just posted a tutorial link in the other
thread that Paul mentioned.
regds.
- satya
 
mohana konakanchi
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks to all... It's working
Mohana
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!