Hi Everyone, I'm new to Java and this site. Can anyone out there please help me with my code? The program compiles but the province and postal code won't transfer on to the text area. I also get a whole bunch of exceptions. I'm sure the problem lies in the actionPerformed method but I've run out of ideas. I've figured out that I don't need an ItemListener for the jcb because I'm not asking it to do anything. Here's my code.
You do not need pack if setting size explicitly. You do not need repainting the text area.
Be careful with the variable jcboProv. It is first defined as an instance field, then shadowed by a local declaration in the constructor. Because you did not initialize this field, but the local variable in the constructor, when the actionperformed method refers later to the field, it finds that it was not intialized.
Maybe you find interesting a basic Java Tutorial like: this one There is also a Tutorial for constructing Java GUIs. [ November 16, 2003: Message edited by: Jose Botella ]
SCJP2. Please Indent your code using UBB Code
Marie Jeanne Thibault
Joined: Nov 15, 2003
Jose, thank you soooo much for helping me out. I've been agonizing over this one for a long time. I won't make the same mistake again. Marie