Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question about actionPerformed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi,
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();
System.out.println(myField.textValue);
This will print null each time because the class will end before user enter value.
So, anyone have a solution to this SIMPLE problem ???
 
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
This is posted in the Swing/AWT and beginner forums. Please do not cross post.
    Bookmark Topic Watch Topic
  • New Topic