equivalent to \n for label

Hey,

I'm trying to output some text in my very first GUI ' ed java-program. I was wondering if it is possible - and if so, how - to have a newline in the same label.

If this is not possible, is there a way then to make sure that all created labels show exactly underneath each other:

String contents = "Hello, \nMy name is Smetje and...";

this shows as one line, how do I "parse" the \n ?

kind greetings

Smetje

[455 byte] By [smetjea] at [2007-11-26 17:32:25]
# 1
You can use html formatting in a JLabel to create multiple lines. Wrap the text in <html> and </html>, then replace the \n with . http://java.sun.com/docs/books/tutorial/uiswing/components/label.html
hunter9000a at 2007-7-9 0:00:26 > top of Java-index,Java Essentials,New To Java...