Possible Duplicate:
How do we changeline in a label?
I have a label and when setting the text I want to change line .
For instance
String str="first line \n Secondline ";
JLabel label.setText(str);
I tried the above code but it does not work..How do I change line in a string ?
Use html formatting! 🙂
You can do all kinds of stuff with it; making text bold, sizing, drawing images etc..!