Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-05-2008, 03:42 PM
Member
 
Join Date: Jun 2008
Posts: 20
Melki is on a distinguished road
Perform one action at a time
Dear all,

When I click a button in my Swing application then it should be made that no other actions can be performed using the mouse until that action is completed.

Please give your ideas regarding this.

Thank you.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-05-2008, 03:55 PM
Fubarable's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 1,289
Fubarable is on a distinguished road
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?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 12-05-2008, 04:45 PM
Fubarable's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 1,289
Fubarable is on a distinguished road
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)
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 12-05-2008, 04:57 PM
Member
 
Join Date: Jun 2008
Posts: 20
Melki is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 12-05-2008, 04:59 PM
Fubarable's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 1,289
Fubarable is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 12-08-2008, 12:44 AM
Member
 
Join Date: Nov 2008
Posts: 5
jacob6900 is on a distinguished road
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.
__________________
Best Regards,
JacobM
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 12-08-2008, 09:29 AM
Member
 
Join Date: Jun 2008
Posts: 20
Melki is on a distinguished road
Thank you jacob it seems as a good idea, I will work on it but does java has any objects that would seperately monitor the changes in the GUI. Because if such an Object exist means then I hope it will be usefull to us in many ways.

Thank you.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
i click on it,then first time error page comes,second time click then product page co 82rathi.angara New To Java 21 08-01-2008 01:13 PM
How to perform some event to button click eva AWT / Swing 2 01-16-2008 02:27 AM
Run RCP action from outside of the Eclipse RCP leonbandas Eclipse 1 01-07-2008 09:15 AM
jsp:forward action Java Tip Java Tips 0 12-24-2007 12:04 PM
Few action in one Jbutton kubiasty New To Java 0 07-25-2007 12:19 PM


All times are GMT +3. The time now is 12:47 PM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org