aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JLabel and text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JLabel and text" Watch "JLabel and text" New topic
Author

JLabel and text

jonas okwara
Ranch Hand

Joined: Jun 22, 2004
Posts: 58
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

Joined: Jun 09, 2003
Posts: 4632
jonas okwara
Ranch Hand

Joined: Jun 22, 2004
Posts: 58
I am using the setText() method of the JLabel object. Can your solution factor into this.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Swing / JFC / AWT forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JLabel and text