Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

setText(String.format()) problem  RSS feed

 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i've this:

i know i can use html to format text inside a JLabel; but in my case i'd like to use the RESULT var: is it impossible?
(because JLabel doesnt recognize the new line stuff)
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know, you have to use HTML to format a JLabel's text to include multiple lines. A new line character doesn't work. This is probably because HTML ignores new line characters and treats them as any other white space.

Layne
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!