This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Question about actionPerformed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

Question about actionPerformed

Paddy Totti

Joined: Dec 12, 2001
Posts: 9
I has a main program which is JFrame, when a button click, I call another class to exlpore a Jframe which contain a textfield. My idea is when enter something in that textfield, the value can be stored,then that Jframe close, and then main program can get that value. However, this is not practical because the function in main class that call the second JFrame will end without waiting user enter value:
//this class prompt user enter text
TJPasswordField myField = new TJPasswordField();
This will print null each time because the class will end before user enter value.
So, anyone have a solution to this SIMPLE problem ???
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
This is posted in the Swint/AWT forum as well. Please don't cross post.
I agree. Here's the link:
subject: Question about actionPerformed
Similar Threads
extending JFrame vs having JFrame as a field
data return between actionPerformed
Communication between JFrames
Question about actionPerformed
Extra window appearing when JFrame is made visible