Getting data from textfield into another class
I have a public frame and a public panel class, the panel class is called panel
In my panel class i do this:
In the same class i can use this to display a name i fill in, it works fine.
public String getName()
String name = nameTextField.getText();
Then i have a controller klasse where i wanna use this method to. So i test this really simple command:
The output is and empty string. How can i get the data i put into a form textfield in another class? In the way i'm showing you. What did i forget?
Panel start = new Panel();