Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Need Help On Jframe Forms..


1 reply to this topic

#1 xtrgeo

    Newbie

  • Kontributors
  • Pip
  • 1 posts

Posted 01 February 2010 - 12:30 PM

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????

Attached Files



#2 afshin_a

    Newbie

  • Kontributors
  • Pip
  • 4 posts

Posted 22 March 2010 - 07:51 PM

View Postxtrgeo, on Feb 1 2010, 05:00 PM, said:

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);




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users