Hi,
Came across this from the Developer Certification forum, as part of a post under the heading 'nx: contractor - max please help', posted by Mike Southgate with a reply from Andrew Monkhouse, back in 2003:-
Hi Mike
Is there a simple box in swing that you can show, like a dialog except that it doesn't require a user response? If there were I could just show it before I do the lock and then make it invisible when I get the lock number. Something like the JOptionPane except without the buttons...
So many options to choose from ....
You could just have a status bar at the bottom of your main window, and put a message in there telling your users what you are doing.
Or you could create a custom JOptionPane / JDialog
Or you could create a custom JWindow
Regards, Andrew
Has anyone implemented anything like the custom JOptionPane/ JDialog or custom JWindow that Andrew suggests?
I maintain an old app that includes functionality for the user to run parameterised searches. User is prompted to enter/lookup parameters to complete a dialog box. Then when they click 'OK' the action validates the input and either presents a dialog to user advising missing/invalid parameter, or displays an animated dialog showing that the search is in progress. This functionality was originally intended to run simple searches (usually single sql statements) so the validation phase is usually very quick; of late, however it has been used for some much bigger multi-sql statement searches, and for these there can be a perceptible delay between invoking the search and user seeing either an 'invalid or missing parameter' dialog or the 'animated running search' dialog. It would seem to be a nice solution to display a simple message 'Initialising Search....' or 'Validating Input.....' when the action is invoked and then hide it when validation fails/the search starts running.
My Swing knowledge isn't that deep but always willing to learn more, all advice/suggestions gratefully received,
Thanks,
Malcolm