Jump to content
xisto Community
Sign in to follow this  
xtrgeo

Need Help On Jframe Forms..

Recommended Posts

Hello. I am new to Java and i really ned some help in order to complete one of my assesments.. My problem is that i cannot make 2 of my classes communicate each other. One of my classes is aJFrameForm and the other is called "register". Below i am giving u the code. When i use method "makeNewSale" in class Register, it canot "pull" the data from a JTextBox which belongs to class "Forma_pwlisis"(one of my forms).Can spomeone help me on getting the code of method "makeNewSale" able to "drag" data of the TextBOx????

code.doc

Share this post


Link to post
Share on other sites

Hello. I am new to Java and i really ned some help in order to complete one of my assesments.. My problem is that i cannot make 2 of my classes communicate each other. One of my classes is aJFrameForm and the other is called "register". Below i am giving u the code. When i use method "makeNewSale" in class Register, it canot "pull" the data from a JTextBox which belongs to class "Forma_pwlisis"(one of my forms).Can spomeone help me on getting the code of method "makeNewSale" able to "drag" data of the TextBOx????


in actionperformed method for jbutton2 you must first create reg field then pass it to the constructor

Forma_pwlisis f2 = new Forma_pwlisis(store,reg);
reg = new Register(f2);

must be like this

reg = new Register(f2);
Forma_pwlisis f2 = new Forma_pwlisis(store,reg);

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.