Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to display a method results on a JTextArea field?

 
Michael Lars
Greenhorn
Posts: 20
Java jQuery Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

I have a simply JTextArea field



and on field I want to display/call a method result!

How to do this?

like... field.append().mymethod();?

Thank you!
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your method should return a value you want to append to JTextArea. With that you would use append method and get the desired result. E.g.:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic