Read the exception:
Looks like line 48 of your MainClass.
PrintStream (System.out) contains print statements for all sorts of data types, not just primitives. To reiterate, go to the line...
Type: Posts; User: copeg
Read the exception:
Looks like line 48 of your MainClass.
PrintStream (System.out) contains print statements for all sorts of data types, not just primitives. To reiterate, go to the line...
null means an object has not been instantiated. In the following code...
String myValue;
...myValue will be null.
What is null on that line of code? Add some println's in there to see (hint: where do you initialize the instance variables?)
Please check your private messages. Lets leave this discussion outside this thread for fear of getting off the main topic at hand.
Yes you need a listener of some sort - an ActionListener your best bet (which you can add to a JTextField). See How to Write an Action Listener (The Java™ Tutorials > Creating a GUI With JFC/Swing >...
Manoj Kumar Chhetri, please read the forum rules. I would also highly recommend that you read following:
The Problem with Spoon-feeding
I am stopping short of removing your code, but that does not...