Okay, I'm wondering if it's possible to use a value from one class in another class. Specifically, a JTextField value. I think I know how to do it normally:
First class: public String textFieldValue() { return x; } Second class: System.out.println(FirstClass.x);
But in my code, a button must first be pressed (using an action listener) to get the JTextField values. This means that I have to use this:
public void actionPerformed(ActionEvent e) { //get JTextField values }
As you probably know, you can't return any values within a void method so I have no idea how to get these values to another class.