943,899 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 874
  • Java RSS
You are currently viewing page 1 of this multi-page discussion thread
May 25th, 2009
0

Jtext area

Expand Post »
HI
I am working on a java application using netbeans,
I face a porblem.
I want to display the output of my program, on jtextarea
(i have designed a jtextarea,) just I want to display the output
namely the content of an array.
plz can anyone help?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
f.damati is offline Offline
28 posts
since Apr 2007
May 25th, 2009
0

Re: Jtext area

Use JTextArea methods append(String str) or setText(String str). Nothing big.
Reputation Points: 12
Solved Threads: 3
Light Poster
Zibo is offline Offline
41 posts
since May 2009
May 25th, 2009
0

Re: Jtext area

I know the methods, but when i use them they throws java.lang.NullPointerException
Reputation Points: 10
Solved Threads: 0
Light Poster
f.damati is offline Offline
28 posts
since Apr 2007
May 25th, 2009
0

Re: Jtext area

Then show this piece of code where You created JTextArea and want to append some text.
Reputation Points: 12
Solved Threads: 3
Light Poster
Zibo is offline Offline
41 posts
since May 2009
May 25th, 2009
0

Re: Jtext area

Click to Expand / Collapse  Quote originally posted by f.damati ...
I know the methods, but when i use them they throws java.lang.NullPointerException
You get that exception because you haven't initialized the objects. You have create something with "new" in order to use it.
Sponsor
Featured Poster
Reputation Points: 1014
Solved Threads: 446
Nearly a Senior Poster
javaAddict is offline Offline
3,259 posts
since Dec 2007
May 26th, 2009
0

Re: Jtext area

thank you, i initialize an object but another problem appears which is the text area doesn't show anything it is empty
Reputation Points: 10
Solved Threads: 0
Light Poster
f.damati is offline Offline
28 posts
since Apr 2007
May 26th, 2009
0

Re: Jtext area

post relevant code
Sponsor
Featured Poster
Reputation Points: 1014
Solved Threads: 446
Nearly a Senior Poster
javaAddict is offline Offline
3,259 posts
since Dec 2007
May 27th, 2009
0

Re: Jtext area

Basically displaying text on jTextArea is not a difficult thing to do. Maybe there is a minute error to be fixed. Pls post your code so that we can check it!
Reputation Points: 10
Solved Threads: 1
Newbie Poster
bluerose is offline Offline
17 posts
since Apr 2009
May 27th, 2009
0

Re: Jtext area

@bluerose

I think javaAddict conveyed that same point with his post. Please don't repeat people for the sake of posting (unless you're adding something to the discussion), otherwise, you'll become like adatapost.
Reputation Points: 874
Solved Threads: 352
Posting Maven
BestJewSinceJC is offline Offline
2,758 posts
since Sep 2008
May 27th, 2009
0

Re: Jtext area

Sorry...thanx for reminding that. I posted that coz i missed that #7 post by javaAddict. I just noticed that when u said now. If i had seen that earlier i wouldn't have posted what i have posted. M not an echoer. However thx!
Reputation Points: 10
Solved Threads: 1
Newbie Poster
bluerose is offline Offline
17 posts
since Apr 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: java.util.GregorianCalendar
Next Thread in Java Forum Timeline: Reading/Writing with ObjectInputStream





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC