Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JLabel and text

 
jonas okwara
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I add three rows of text to a JLabel();. what I have done so far is to add the each row of text to a JLabel object,add the label objects to a pane with a "GridLayout(0,1)". I tried a BoxLayout but the gaps between the rows was much .

Please is there a better way of doing this.

thx

newbie
jones
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
jonas okwara
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the setText() method of the JLabel object. Can your solution factor into this.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic