Forums Register Login

print data to textarea

+Pie Number of slices to send: Send

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
+Pie Number of slices to send: Send
This sounds like a Swing question since it is about outputting data to a JTextArea. Moving to our Swing forum.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
ya but i had already define them in private field

now tell me what can i do
+Pie Number of slices to send: Send
> 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
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
> you reply if you know answer.

I do, because I've read the documentation.

I even gave you a hint in my first reply.
+Pie Number of slices to send: Send
Tapan,
Please use the quote button only when you want to quote something. For your own replies, please use the Post Reply button
+Pie Number of slices to send: Send
 

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.
This one time, at bandcamp, I had relations with a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 4772 times.
Similar Threads
Returning a 0 value error
simple coding, still not working, may day!!!!
Capturing printStackTrace()
retrieving database data to textarea
ActiveXObject problem with IE
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:53:11.