tags:

views:

53

answers:

1

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.

+2  A: 

I guess you need to use TextArea.

sza
yup thanks.....