How to stop window closing in "internalFrameClosing" event.

How to stop window closing in "internalFrameClosing" event.

In an internal frame listener in the internalFrameClosing event I want to ask the user to confirm closure with a JDialog. The default close operation for the Internal Frame is "DO_NOTHINg. If the dialog answer is "YES" I just do frame.dispose() and it works. If the answer is "NO" I do frame.doDefaultCloseAction() which leaves the frame open as expected. However it always leaves the JDialog visible. If I do not do "frame.doDefaultCloseAction()" then the whole internal frame will close anyway. I have tried making the Dialog invisible or disposing it but it is still there. Is there a way to abort the frame closing event so the user can go back and save their work or do further edits? Thankyou for your assistance

View Answers









Related Tutorials/Questions & Answers:
How to stop window closing in "internalFrameClosing" event.
How to stop window closing in "internalFrameClosing" event.  In an internal frame listener in the internalFrameClosing event I want to ask the user... it but it is still there. Is there a way to abort the frame closing event so the user can go back
window closing
window closing  hello, In my project i have login,logout... script. and i need one solution that,when ever user trying to close browser window... call how to achive this requriment. Thank you
Advertisements
Closing the browser window
Closing the browser window  <BODY> <form> <input type=button value="Close Window" onClick="javascript:window.close();"> <...; thought that this will close the window of the browser but not working
Closing any kind of browser window without confirmation using javascript
Closing any kind of browser window without confirmation using javascript  Here is my requirement, I have to close a browser window on onload event. I have tried with window.close() and self.close(). But it doesn't work. Please
closing the internet explorer window of any version without confirmation using javascript
closing the internet explorer window of any version without confirmation using javascript  Hi all, Here is my requirement, I have to close microsoft internet explorer window on onload event without confirmation. It should
The Window Event - Swing AWT
The Window Event  hey plz i need help here... plz modify..., 700); setTitle("The Window Button"); setVisible(true... void actionPerformed(ActionEvent event) { } public static void
how to stop audio (mp3)
how to stop audio (mp3)   if(e.getActionCommand(). equals("Stop... have to stop a song. on writing player.close() it pauses the song rather than stopping it. how should i stop the song keeping in mind i have to play another song
Java window state event
Java window state event  Two java windows, one on top of another... Window at the back is deactivated when the other is on the top. Can iconify when there is only one window using win+d key. In windows, press win+d, window
How to make a closing eyes, make a closing eyes, closing eyes
How to make a closing eyes     ... eye to closing eye. You will learn here how is it made possible... an animation window, now adjust all the layer one by one in the every new
Java how to stop audio
Java how to stop audio  hello i have this code in the main: try { AudioInputStream audio = AudioSystem.getAudioInputStream(new File...); } I want that when i press the stop button in the gui, the audio stops
How to stop the execution of midlet in j2me?
How to stop the execution of midlet in j2me?  Hi, How to stop the execution of midlet of j2me for a specific amount of time? Thanks & Regards, Sivakumar.JADS_TO_REPLACE_1
how to solve 'Stop Running This Script' Error ?
how to solve 'Stop Running This Script' Error ?  Hi.. When opened the page on IE browser(version : 8.0),it gives an java script error (i.e.Stop Running This Script). I have used jsp/servlet for this. Please help to resolved
How to Make iPhone Window Application
How to Make iPhone Window Application  Hi, For Making iphone window application, what parameters i have to follow or provide example related to iphone window application. Thanks
Window
Window  how to create an window of a person like regestration form
how to allow or stop using internet - Java Server Faces Questions
how to allow or stop using internet  hello this is my first qusetion I am developing a cybercafe management tool in java,the problem is how to allow or stop the users of cafe using internet by the administrator on other
Tracing unexpected closing of awindow... - JSP-Servlet
Tracing unexpected closing of awindow...  Hello friends, How can we track unexpectedly closing a window when a jsp project running with session concept. And this tracking should update the log in status in data base
How to Handle Event Handlers?
How to Handle Event Handlers?  How to Handle Event Handlers
how to focus on the new window opened from JSF ?
how to focus on the new window opened from JSF ?  Hi guys, I have commandLink with action which using javascript to open a new window(window.open()). Problem is, the new window opens at background behind the current window
How to clear a Dos Window? - Java Beginners
How to clear a Dos Window?  problem with the following code: This code is opening another dos window.Is it possible to close the first dos window without exiting from the second window...I don't want to open two windows...how
stop repetition
stop repetition  i want to know use of Hashmap, and its contains key... record more than one time. so could u please guide me how to handle this problem... they have same id so i want to stop repetition
ModuleNotFoundError: No module named 'stop'
ModuleNotFoundError: No module named 'stop'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'stop' How to remove the ModuleNotFoundError: No module named 'stop' error
How to stop java scripting engine when the script being run is taking too much time?
How to stop java scripting engine when the script being run is taking too much time?   How to stop java scripting engine when the script being run is taking too much time? for e,g, in case of infinite loop the memory is getting
stop the running hidden server
will need to stop the other process or change the port number(s). how to stop tis...stop the running hidden server  Port 8080 required by Tomcat v6.0 Server at localhost is already in use. The server may already be running in another
closing connections in finally block
closing connections in finally block  Hi, What will happen if I close connection before closing the resultset in the finally clock? e.g. finally... { ... conn.close(); rs.Close(); } If i do as above ... what will happen
how to use a JInternalFrame in a JFrame to create a chat window in a client/server app?
how to use a JInternalFrame in a JFrame to create a chat window in a client/server app?  how to use a JInternalFrame within a JFrame? i want... with JDeskTopPane but i want a chat window which can be moved within the app(just like
ModuleNotFoundError: No module named 'stop-words'
'stop-words' How to remove the ModuleNotFoundError: No module named 'stop...ModuleNotFoundError: No module named 'stop-words'  Hi, My Python... have to install padas library. You can install stop-words python
how to get small rectangular box or small window - JSP-Servlet
how to get small rectangular box or small window   Dear sir... or small window in that it has to show a full content of a message within a large window on mouse moves on a particular hyperlink .How to do it sir please help me
ModuleNotFoundError: No module named 'multi-thread-closing'
: No module named 'multi-thread-closing' How to remove the ModuleNotFoundError: No module named 'multi-thread-closing' error? Thanks   Hi...ModuleNotFoundError: No module named 'multi-thread-closing'  Hi
ModuleNotFoundError: No module named 'multi-thread-closing'
: No module named 'multi-thread-closing' How to remove the ModuleNotFoundError: No module named 'multi-thread-closing' error? Thanks   Hi...ModuleNotFoundError: No module named 'multi-thread-closing'  Hi
ModuleNotFoundError: No module named 'odoo10-addon-project-closing'
: No module named 'odoo10-addon-project-closing' How to remove the ModuleNotFoundError: No module named 'odoo10-addon-project-closing' error...ModuleNotFoundError: No module named 'odoo10-addon-project-closing'  
ModuleNotFoundError: No module named 'odoo10-addons-oca-account-closing'
: ModuleNotFoundError: No module named 'odoo10-addons-oca-account-closing' How to remove the ModuleNotFoundError: No module named 'odoo10-addons-oca-account-closing'...ModuleNotFoundError: No module named 'odoo10-addons-oca-account-closing
ModuleNotFoundError: No module named 'odoo10-addons-oca-account-closing'
: ModuleNotFoundError: No module named 'odoo10-addons-oca-account-closing' How to remove the ModuleNotFoundError: No module named 'odoo10-addons-oca-account-closing'...ModuleNotFoundError: No module named 'odoo10-addons-oca-account-closing
ModuleNotFoundError: No module named 'odoo11-addon-project-closing'
: No module named 'odoo11-addon-project-closing' How to remove the ModuleNotFoundError: No module named 'odoo11-addon-project-closing' error...ModuleNotFoundError: No module named 'odoo11-addon-project-closing'  
ModuleNotFoundError: No module named 'odoo11-addons-oca-account-closing'
: ModuleNotFoundError: No module named 'odoo11-addons-oca-account-closing' How to remove the ModuleNotFoundError: No module named 'odoo11-addons-oca-account-closing'...ModuleNotFoundError: No module named 'odoo11-addons-oca-account-closing
ModuleNotFoundError: No module named 'odoo11-addons-oca-account-closing'
: ModuleNotFoundError: No module named 'odoo11-addons-oca-account-closing' How to remove the ModuleNotFoundError: No module named 'odoo11-addons-oca-account-closing'...ModuleNotFoundError: No module named 'odoo11-addons-oca-account-closing
ModuleNotFoundError: No module named 'odoo11-addons-oca-account-closing'
: ModuleNotFoundError: No module named 'odoo11-addons-oca-account-closing' How to remove the ModuleNotFoundError: No module named 'odoo11-addons-oca-account-closing'...ModuleNotFoundError: No module named 'odoo11-addons-oca-account-closing
ModuleNotFoundError: No module named 'odoo12-addons-oca-account-closing'
: ModuleNotFoundError: No module named 'odoo12-addons-oca-account-closing' How to remove the ModuleNotFoundError: No module named 'odoo12-addons-oca-account-closing'...ModuleNotFoundError: No module named 'odoo12-addons-oca-account-closing
ModuleNotFoundError: No module named 'odoo12-addons-oca-account-closing'
: ModuleNotFoundError: No module named 'odoo12-addons-oca-account-closing' How to remove the ModuleNotFoundError: No module named 'odoo12-addons-oca-account-closing'...ModuleNotFoundError: No module named 'odoo12-addons-oca-account-closing
ModuleNotFoundError: No module named 'odoo8-addon-l10n-es-fiscal-year-closing'
: ModuleNotFoundError: No module named 'odoo8-addon-l10n-es-fiscal-year-closing' How...ModuleNotFoundError: No module named 'odoo8-addon-l10n-es-fiscal-year-closing...-year-closing' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'odoo8-addon-l10n-es-fiscal-year-closing'
: ModuleNotFoundError: No module named 'odoo8-addon-l10n-es-fiscal-year-closing' How...ModuleNotFoundError: No module named 'odoo8-addon-l10n-es-fiscal-year-closing...-year-closing' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'odoo8-addon-project-closing'
: No module named 'odoo8-addon-project-closing' How to remove the ModuleNotFoundError: No module named 'odoo8-addon-project-closing' error? Thanks...ModuleNotFoundError: No module named 'odoo8-addon-project-closing'  
ModuleNotFoundError: No module named 'odoo8-addons-oca-account-closing'
: ModuleNotFoundError: No module named 'odoo8-addons-oca-account-closing' How to remove the ModuleNotFoundError: No module named 'odoo8-addons-oca-account-closing'...ModuleNotFoundError: No module named 'odoo8-addons-oca-account-closing
ModuleNotFoundError: No module named 'odoo9-addon-project-closing'
: No module named 'odoo9-addon-project-closing' How to remove the ModuleNotFoundError: No module named 'odoo9-addon-project-closing' error? Thanks...ModuleNotFoundError: No module named 'odoo9-addon-project-closing'  
ModuleNotFoundError: No module named 'odoo9-addons-oca-account-closing'
: ModuleNotFoundError: No module named 'odoo9-addons-oca-account-closing' How to remove the ModuleNotFoundError: No module named 'odoo9-addons-oca-account-closing'...ModuleNotFoundError: No module named 'odoo9-addons-oca-account-closing
iPhone play, pause and stop playing music
iPhone play, pause and stop playing music This is the small iPhone SDK example that will show you how to play, pause and stop the music on button...) playSound:(id)sender; -(IBAction) stop:(id)sender; -(IBAction
Flex terminating event flow example
;    In the example below, how to terminate an event flow... statements as arguments are passed in two different event handlers to stop.... Methods stop the event object on moving to next node or task, here the task
Chat window
in the same application. I want to know how to retain the chat window (along... the chat window pops up.. It is a div in the chat homepage.. There are few other..., the chat window should be constant across all pages in the application for current
Version of jetty>stop dependency
List of Version of jetty>stop dependency
How to add tabs in right side of a window from top to bottom in swing s
How to add tabs in right side of a window from top to bottom in swing s  How to add tabs in right side of a window from top to bottom in swings
How to add tabs in right side of a window from top to bottom in swing s
How to add tabs in right side of a window from top to bottom in swing s  How to add tabs in right side of a window from top to bottom in swings

Ads