Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

displaying text in jtextarea

Thread view: 
jkon@hawaii.rr.com - 17 Jul 2006 21:22 GMT
Hi i am a begginning programmer, and am having problems displaying text
in a jtextarea.
The goal of the program is that when a button is clicked, then text is
displayed in the jtextarea.
It compiles fine, and runs with no errors.  The problem is that the
text is not being displayed in the jtext area.  can someone help me?
Andrew Thompson - 17 Jul 2006 23:25 GMT
> Hi i am a begginning programmer, and am having problems displaying text
> in a jtextarea.

There is a good group for those beginning Java, it is..
comp.lang.java.help

> The goal of the program is that when a button is clicked, then text is
> displayed in the jtextarea.
> It compiles fine, and runs with no errors.

Are you sure?  New programmers are prone to writing code
that hides errors.  Where is your (short, self contained) code
so that we can confirm that?

Andrew T.
Mark Space - 18 Jul 2006 06:47 GMT
> Hi i am a begginning programmer, and am having problems displaying text
> in a jtextarea.
> The goal of the program is that when a button is clicked, then text is
> displayed in the jtextarea.
> It compiles fine, and runs with no errors.  The problem is that the
> text is not being displayed in the jtext area.  can someone help me?

It was pretty easy when i did it the first time, but I'd had some Java
already, I was using NetBeans to generate the swing componets, and I'm
hardly new to programming in general.

Try adding some "System.err.println( "test..." ); around your code,
especially the parts you think are working.  There should be an event
that fires when you click on the button (probably an action event), some
text you grab from somewhere (print that out too) and then .add( "text"
) to the jTextArea.

That's about all there is to it.  If you can't figure out what going on,
download NetBeans, add your program as a project, and use the debugger
to step through your code.  Sometimes it's the only way.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.