Results 1 to 3 of 3
Thread: Wait for ActionEvent
- 05-31-2012, 05:46 AM #1
Member
- Join Date
- Apr 2012
- Posts
- 25
- Rep Power
- 0
Wait for ActionEvent
Hello!
Trying to write a program that involves waiting for a command from the user to do something. More specifically, I want a command from a JTextField to be executed whenever the "Enter" key is pressed. I'm trying to set a String equal to that value, but not sure how to pause and wait. CountDownLatch? Semaphore? Probably not even on the right track with those.
Any help would be great. Thanks!
- 05-31-2012, 06:30 AM #2
Re: Wait for ActionEvent
You can include a button with an ActionListener. Once user enters command into textfield they must click the button and the action will be fired.
- 05-31-2012, 12:08 PM #3
Similar Threads
-
Need help with ActionEvent/ItemEvent
By patriotsfan in forum AWT / SwingReplies: 2Last Post: 06-05-2011, 02:17 PM -
What does (this) and ActionEvent e mean?
By africanhacker in forum New To JavaReplies: 3Last Post: 02-06-2011, 05:08 PM -
StringBuilder/ActionEvent help!
By Red727 in forum New To JavaReplies: 8Last Post: 12-07-2010, 03:01 AM -
[SOLVED] Actionevent problem
By Cymro in forum New To JavaReplies: 3Last Post: 04-04-2008, 07:11 AM -
ActionEvent example
By Java Tip in forum Java TipReplies: 0Last Post: 03-11-2008, 11:00 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks