So I made a frame for user to key in the name and student id in JTextField
. I implemented ActionListener
to get the text from the text fields. Now I want to retrieve the text to be displayed in a different frame. How do I do that?
Asked
Active
Viewed 201 times
-4

Andrew Thompson
- 168,117
- 40
- 217
- 433

wally
- 5
-
1*"..in a different frame."* See [The Use of Multiple JFrames, Good/Bad Practice?](http://stackoverflow.com/q/9554636/418556) – Andrew Thompson Dec 21 '14 at 15:45
-
You've gotten an answer that answers the simple parts of your question, the parts that we can understand based on what you've posted, but I'm feeling that your question has much more to it than this, that your main problem isn't how to extract a String from a JTextField, but rather how to get data from a Swing component that is held by a different class and displayed in a different window than that of the calling code. If so, you really need to improve your question greatly, including creating and posting a [minimal example program](http://stackoverflow.com/help/mcve). – Hovercraft Full Of Eels Dec 21 '14 at 17:35