I\'m new to Java and I\'ve hit a brick wall. I want to access GUI components (that have been created in one class) from another class. I am creating a new GUI class from one
here i add a simple solution hope it works good,
Form A
Textfield : txtusername
FormB fb = new FormB();
fb.loginreset(txtusername); //only textfield name no other attributes
Form B
to access FormA's control
public void ResetTextbox(JTextField jf)
{
jf.setText(null); // or you can set or get any text
}