File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How To make Button Display in JTextarea

 
Sean Magee
Ranch Hand
Posts: 69
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i get a something to display in the JTextArea?

Here is an example of my code




Now everytime I hit south, How do i get something to display in the TextArea?
 
Sainath Veepuri
Ranch Hand
Posts: 49
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sean,
Use the setText method to insert the text you wanted to display.
Was this what you wanted?
- Sai
 
Sean Magee
Ranch Hand
Posts: 69
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Something like that right?

Well yeah I tried that and I get::


This happens when I use the Append method too.
JTextArea is imported, and is global
[ December 08, 2004: Message edited by: Sean Magee ]
 
sasi kala
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi sean,

setText is not a variable its a method,

To setText use text.setText("...");
To append to use text.append("...");

All The Best.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic