How do I scan TextArea into arraylist?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: How do I scan TextArea into arraylist?

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Posts
    3

    How do I scan TextArea into arraylist?

    Sorry for the newbies question. Tried google it, but as u see I failed in finding the answer.

    How do I scan TextArea and load each new line into arraylist and later output array into different TextArea? Thank You.

  2. #2
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    getAccessibleText() or getAccessibleEditableText() methods of the AccessibleContext object returned by the TextArea's getAccessibleContext() method

  3. #3
    Join Date
    Apr 2007
    Posts
    3
    Thank you. Does it put the hold textArea into array[1] or does put each new line into different location of the array?

  4. #4
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    use the AccessibleText's getTextRange( start, end ) method to get a String which you can add to your array/ArrayList/other container

  5. #5
    Join Date
    Apr 2007
    Posts
    3
    is AccessibleText's getTextRange( start, end ) only in javac 1.6? I can't find it with ver 1.5 I have. I'm noob to this still.

  6. #6
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    Looks like the getTextRange() is for the AccessibleEditableText, while the AccessibleText implementing classes expose getSelectedText() and getAfterIndex() methods

Similar Threads

  1. c# to vb .net (2005) help
    By Javfarary in forum .NET
    Replies: 4
    Last Post: 12-23-2006, 04:09 PM
  2. Help with displaying contents of ArrayList
    By jawolken in forum Java
    Replies: 3
    Last Post: 10-11-2006, 03:30 PM
  3. ArrayList
    By docfish in forum Java
    Replies: 1
    Last Post: 03-06-2006, 03:36 PM
  4. Replies: 10
    Last Post: 05-15-2005, 06:14 AM
  5. Converting arraylist to array
    By warriorwarren in forum Java
    Replies: 11
    Last Post: 03-19-2005, 01:13 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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center