This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes passing value and setting it to jlabel text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply locked New topic

passing value and setting it to jlabel text

Rodney Perello

Joined: Sep 18, 2012
Posts: 1
This site is really helping a lot of people! I have a simple program that I can't understand why I am getting the NullPointerException each time I try to pass a value from one form to another and setting it up as a text in a label. If I pass the value and do the pritln, I can actually see the result but if I place it in the jlabel as text, that's the time I get the error. Please Help! Thanks! Here is the code to pass the value to the other form.

Bill Gorder

Joined: Mar 07, 2010
Posts: 1682

Looks like you may have intended to post this in our Swing (not Spring ) forum. I will move it there for you. Welcome to the Ranch!

[How To Ask Questions][Read before you PM me]
Ranganathan Kaliyur Mannar

Joined: Oct 16, 2003
Posts: 1101

I think this is a duplicate of this thread. We can continue the discussions there. Locking down this thread.

I agree. Here's the link:
subject: passing value and setting it to jlabel text
jQuery in Action, 3rd edition