Results 1 to 7 of 7
Thread: Perform one action at a time
- 12-05-2008, 01:42 PM #1
Member
- Join Date
- Jun 2008
- Posts
- 20
- Rep Power
- 0
-
what do you mean by "no other actions can be performed using the mouse"? Do you mean that other buttons and components are not enabled until some action is complete? Can you post a small compilable program that shows an idea of what you're trying to do?
-
To the original poster, cross-posting can frustrate anyone who tries to help you only to find out later that the same answer was given hours ago in a cross-posted thread. No one likes wasting their time, especially a volunteer. The polite thing to do would be to not do this, but if you feel that you absolutely must, to at least provide links in both cross-posts to each other.
Freeze the GUI on a button click process. (Swing / AWT / SWT / JFace forum at JavaRanch)
- 12-05-2008, 02:57 PM #4
Member
- Join Date
- Jun 2008
- Posts
- 20
- Rep Power
- 0
I am having a GUI where i will be having four or five buttons more than that i will be having a tree also. For each buttons there will be an action called, on the same time in the tree also on selecting each node of the tree an action will be performed. So when the user clicks one of the buttons then I should not allow him to click other buttons until the action of this(clicked) button is completed. Also I should not allow him to click the nodes of the trees also.
I hope this will give you an idea.
Thank you.
-
Since I have no idea if someone else is giving the same suggestion elsewhere in a cross-post and am not in the mood to do futile work, I'm dropping this thread. Best of luck.
- 12-07-2008, 10:44 PM #6
Member
- Join Date
- Nov 2008
- Posts
- 5
- Rep Power
- 0
I am assuming you are using the MouseClicked event. Using the ActionPerformed should (depending on your jre version) keep the mouse down until the functions within its scope are complete. A hack I have used before is to create a Boolean canClick, set it to false on click, then when all functions are complete set it to true. The other buttons would check this and if false, they would not click.
- 12-08-2008, 07:29 AM #7
Member
- Join Date
- Jun 2008
- Posts
- 20
- Rep Power
- 0
Similar Threads
-
i click on it,then first time error page comes,second time click then product page co
By 82rathi.angara in forum New To JavaReplies: 21Last Post: 08-01-2008, 11:13 AM -
How to perform some event to button click
By eva in forum AWT / SwingReplies: 2Last Post: 01-16-2008, 12:27 AM -
Run RCP action from outside of the Eclipse RCP
By leonbandas in forum EclipseReplies: 1Last Post: 01-07-2008, 07:15 AM -
jsp:forward action
By Java Tip in forum Java TipReplies: 0Last Post: 12-24-2007, 10:04 AM -
Few action in one Jbutton
By kubiasty in forum New To JavaReplies: 0Last Post: 07-25-2007, 10:19 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks