This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply locked New topic
Author

passing value and setting it to jlabel text

Rodney Perello
Greenhorn

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
Bartender

Joined: Mar 07, 2010
Posts: 1646
    
    7

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
Bartender

Joined: Oct 16, 2003
Posts: 1076
    
  10

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


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing value and setting it to jlabel text
 
Similar Threads
GridBagLayout Problem
Vertical JLable
Problem with dynamically setting the classpath at runtime
passing value and setting it to jlabel text
making a class visible