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 button 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. But for me the requirement is when I click one button then the whole GUI should freeze so that no other action can be performed until the process of this buttons action is performed.
How about just using a boolean as a flag? Actions first check the boolean. If the boolean indicates no current action, the new action toggles the boolean. When the new action is done, it toggles the boolean back.
However, this doesn't give the user any visual cue regarding the 'freeze.' I suppose every time you toggle the flag boolean, you can also toggle all of the enabled properties of your components. Does anyone have a simple way of disabling a Container with all of its children, children's children, etc.? The best I can think of is a recursive dive.
> Is there any condition that i should not post my queries in any other forums?
none whatsoever - you're free to do as you please.
from my point of view, occasionally I've spent quite some time putting together a sample program to demonstrate a solution (easier than trying to explain it), then clicked on another forum, only to see the same question answered some hours earlier.
I do enjoy wasting my time like that - just trying to help someone.
like you, I'm free to do as I please, and I choose never to provide solutions to known cross-posters.
All that aside, cross-posting, done properly benefits everyone.
Joined: Aug 29, 2008
Thank you for your reply. What could be the solution to post the same topic in two forums so that I could get more suggestions.
Joined: Jun 09, 2003
the correct way is to post in a single forum first (here, sun, other) give it a bit of time for a response if no response, or responses don't work/whatever, then post in a second forum, but start by mentioning that you've already posted at..., and provide a link to your first post.
now go back to your first post and mention you've now also posted at ..., and provide a link to the second post.
this way, anyone can click the links and see what the total response is.
anyone with a similar problem, searching (e.g.) javaranch, might not have the solution posted here, but it might be posted in the link at (e.g.) sun forum, and vice versa
Joined: Aug 29, 2008
Thank you very much for your kind suggestion and solution. [ December 06, 2008: Message edited by: Melki Joe ]
subject: Freeze the GUI on a button click process.