Hi,
One way of displaying multi-line text into a button is by using HTML within the text.. ie
jButton1.setText("< HTML >This is
Java ranch< / HTML >");
However the preferred size of a button is always dependent on the font and the insets used. Using this approach also overides any set fonts that may have been already attached to the button.
Other than that I'm unsure... I'm having a similar problem with wanting to display multiline text within a label, which I've had to solve by creating a text area, which behaves like a label... nasty
ps:
I added the spaces for the HTML tags so that they show up in your post.
- satya
[This message has been edited by Madhav Lakkapragada (edited June 21, 2001).]