new line in java
Posted
by user225269
on Stack Overflow
See other posts from Stack Overflow
or by user225269
Published on 2010-05-30T04:19:50Z
Indexed on
2010/05/30
4:22 UTC
Read the original article
Hit count: 269
Java newbie here, I'm having trouble setting a new line in this code:
String FnameTextboxText = FnameTextbox.getText();
String LastnameTextboxText = LastnameTextbox.getText();
String CourseTextboxText = CourseTextbox.getText();
Summary.setText("Firstname:" + " " + FnameTextboxText + "\nLastname:" + " " + LastnameTextboxText + "\nCourse:" + " " + CourseTextboxText);
Also tried something like: "\n" + "Lastname"
But its no good.
Do you have any idea on how to make new lines. So that it'll look like this;
Firstname: x
Lastname: y
Course: Z
Using netbeans 6.8. On windows.
© Stack Overflow or respective owner