Results 1 to 2 of 2
  1. #1
    hero is offline Member
    Join Date
    Jul 2009
    Posts
    20
    Rep Power
    0

    Default setText in JTextArea

    Hi, i have a little question here.
    How can i get a new line with the setText method using a JTextarea?

    for example:
    static String array[]=new String[2];
    public JTextArea text = new JTextArea();
    text.setText(array[0]+"/n"+array[1];

    the "/n" doesn't work, is there another option?

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

Similar Threads

  1. Tab key in JTextArea
    By KristoZ in forum New To Java
    Replies: 1
    Last Post: 09-25-2009, 07:27 PM
  2. Replies: 3
    Last Post: 05-25-2009, 03:33 AM
  3. setText() problem
    By jls7168 in forum New To Java
    Replies: 2
    Last Post: 02-20-2009, 10:34 PM
  4. [SOLVED] new2java- gettext settext
    By obdi in forum New To Java
    Replies: 4
    Last Post: 07-21-2008, 09:28 AM
  5. setText in event
    By sniezna.stopa in forum SWT / JFace
    Replies: 0
    Last Post: 06-20-2008, 02:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •