File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes print data to textarea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "print data to textarea" Watch "print data to textarea" New topic
Author

print data to textarea

Tapan Prajapati
Greenhorn

Joined: Mar 05, 2010
Posts: 27

m use net bean and i want to print the data to text area but i only print them it in command prompt not in text area
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30512
    
150

This sounds like a Swing question since it is about outputting data to a JTextArea. Moving to our Swing forum.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
you have in your code this:
System.out.println(name +"\t" + "-"+ phonenumber);

and this:
pw.println( name + "\t" + phonenumber);

and this:
recordTextArea.setText(phonenumber);

it seems you know how to access the textArea (unless this is not your code),
so just refer to the JTextArea apidocs for a method to add, or append (hint), text.
Tapan Prajapati
Greenhorn

Joined: Mar 05, 2010
Posts: 27
ya but i had already define them in private field

now tell me what can i do
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> now tell me what can i do

I already told you 'where' and 'what'.

if you want someone to write it for you, try rent-a-coder
Tapan Prajapati
Greenhorn

Joined: Mar 05, 2010
Posts: 27
i don't know what you want to say , you reply if you know answer. i just want to print the database data to my text area that's all.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> you reply if you know answer.

I do, because I've read the documentation.

I even gave you a hint in my first reply.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10360
    
    8

Tapan,
Please use the quote button only when you want to quote something. For your own replies, please use the Post Reply button


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19693
    
  20

Tapan Prajapati wrote:i just want to print the database data to my text area that's all.

Have you even read Michael's first reply?
Michael Dunn wrote:so just refer to the JTextArea apidocs for a method to add, or append (hint), text.

Click on JTextArea if you don't know how to find the API docs.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: print data to textarea