How to get the contents in JTextArea???

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • janaki112
    New Member
    • Dec 2006
    • 5

    How to get the contents in JTextArea???

    Hi,

    Can u please help in getting the contents in the JTextArea and writing tat into a file and also writing the contents of the file in to JTextArea????

    can u give me the class or function name with an example code....
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by janaki112
    Hi,

    Can u please help in getting the contents in the JTextArea and writing tat into a file and also writing the contents of the file in to JTextArea????

    can u give me the class or function name with an example code....
    Note that the JTextArea inherits read() and write() methods from the JTextComponent
    class. Check the relevant API docs.

    kind regards,

    Jos

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by janaki112
      Hi,

      Can u please help in getting the contents in the JTextArea and writing tat into a file and also writing the contents of the file in to JTextArea????

      can u give me the class or function name with an example code....
      Checking the api will show you how to use getText, setText and append methods

      Comment

      Working...