Here is the syntax… on the first frame
JTextField tf1 = new JTextField();
from the bottom there has the actionListener
this.setVisible(false);
new Display().setVisible(true);
Now on the 2nd Frame i want to create a text field that automatically display the one I typed in the textfield on first frame. (but when I try to call the tf1 variable, it cannot be resolved.)
Maintain an object reference to the textfield you want to get the text from and also the one you want to copy the text to, and then the methods
getText()andsetText()will do what you require.If you need more help, I suggest you add some more specific details to your question, perhaps along with some example code.
How about this suggestion:
theTextFieldpublic String getText()that gets the text from theTextField when it is calledpublic void setText(String text)that sets the text in theTextField when it is calledoutputTextFrame.setText()When you want to call the last point is up to the business logic of your application