Results 1 to 2 of 2
  1. #1
    javaamateur1 is offline >forever amateur<
    Join Date
    Aug 2011
    Posts
    1
    Rep Power
    0

    Exclamation how do i get the next line for a jtextarea?

    i need help in getting the next line for the jtextarea?
    so far i can get the first line using .substring, but then to transfer to the next line, what do i do? because the input depends on what the user puts, and i just want to start getting it from the next line.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,048
    Blog Entries
    7
    Rep Power
    23

    Default

    Read the API documentation for the getLineEndOffset() method; one position beyond that value is the start of the next line (if any).

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

Similar Threads

  1. Highlighting line in JTextArea
    By misiom1 in forum New To Java
    Replies: 4
    Last Post: 01-15-2011, 02:39 PM
  2. JTextArea How To get one Line only..?
    By Dinesh_rockz in forum AWT / Swing
    Replies: 2
    Last Post: 01-12-2011, 06:25 PM
  3. JtextArea autoamtic update the last line
    By sircurse in forum NetBeans
    Replies: 1
    Last Post: 10-28-2010, 07:08 PM
  4. [SOLVED] Last line in JTextArea wont display
    By Chris.Brown.SPE in forum Advanced Java
    Replies: 5
    Last Post: 04-11-2008, 01:52 PM
  5. How to always show the last line in my JTextArea?
    By Ashley in forum New To Java
    Replies: 1
    Last Post: 05-26-2007, 01:01 PM

Tags for this Thread

Posting Permissions

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