Results 1 to 3 of 3
Thread: Stop action event in JDialog
- 10-14-2010, 11:42 AM #1
Member
- Join Date
- Sep 2010
- Posts
- 4
- Rep Power
- 0
Stop action event in JDialog
Hello,
I have a poblem with stoppping an action event in a JDialog. The dialog has a panel and the panel has two buttons. When the first button is clicked and an event was performed, I want to cancel the event of that button by pressing the second button. The problem is I cannot clicked the second button while the event of the pressed first button is still occuring.
Can somebody explain why.
Thanks!
- 10-14-2010, 11:48 AM #2
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 780
- Rep Power
- 4
You have to create a new thread in the listener method. If not, you are blocking the EDT (event dispatch thread).
Now, you can easily stopping the event by stopping the thread in listener two :)
- 10-15-2010, 03:24 AM #3
Member
- Join Date
- Sep 2010
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
HTTP Status 404 - There is no Action mapped for action name showmainframe...
By vaibhavspawar in forum Advanced JavaReplies: 3Last Post: 08-19-2010, 08:27 AM -
Use stop button to stop moving (stop timers) on JPanel
By mneskovic in forum New To JavaReplies: 3Last Post: 07-23-2010, 12:50 PM -
checking for an event during an event
By infinity in forum AWT / SwingReplies: 22Last Post: 04-09-2009, 01:08 AM -
Action Event and Listeners
By lost1 in forum New To JavaReplies: 3Last Post: 11-14-2007, 04:26 AM -
help with jdialog
By leonard in forum AWT / SwingReplies: 1Last Post: 08-05-2007, 05:37 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks