• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

print data to textarea

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
author & internet detective
Posts: 40483
822
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This sounds like a Swing question since it is about outputting data to a JTextArea. Moving to our Swing forum.
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ya but i had already define them in private field

now tell me what can i do
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> 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
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> you reply if you know answer.

I do, because I've read the documentation.

I even gave you a hint in my first reply.
 
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tapan,
Please use the quote button only when you want to quote something. For your own replies, please use the Post Reply button
 
Sheriff
Posts: 22082
113
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Put the moon back where you found it! We need it for tides and poetry and stuff. Like this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic