Possible Duplicate:
JButton and JField labels/text?
I try to do a line break for jButton in java swing.
public static String newline = System.getProperty("line.separator");
private JButton getJButton_discussion() {
if (jButton_discussion == null) {
jButton_discussion = new JButton();
jButton_discussion.setBounds(new Rectangle(228, 63, 344, 97));
jButton_discussion.setText("Discussion" + newline + "A place to duscuss latest events");
}
However, my "Discussion" and the words after it still appear in the same line. It does not perform a line break. Any helps will be appreciated.