Have a JDBC application: while the query is geeting the results set, I want to diaable the mouse clicks or lock the screen, use modal dialog. But once the result set is back the modal dialog should disappear. Is there a way to dismiss the JOPTIONPANE.XXXX even if the user did not select any choice. OR how to disable the mouse clicks while the result set is being fetched, and enable mouse clicks after that programmatically thanks Selvan