How to stop window closing in "internalFrameClosing" event.

 
 

Share on Google+Share on Google+

michael davies
How to stop window closing in "internalFrameClosing" event.
0 Answer(s)      a year and 9 months ago
Posted in : Java Beginners

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

Ads
View Answers
Ads









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
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
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 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... will find an animation window, now adjust all the layer one by one
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
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.J
How to Handle Event Handlers?
How to Handle Event Handlers?  How to Handle Event Handlers
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
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
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
What are events? Explain how Event handling in Java?
What are events? Explain how Event handling in Java?  What are events? Explain how Event handling in Java?   Hi, The Events..., and introduces us to AWT event handling. For Details about Event Handling in Java
how to add audio clip in swings with event handling
how to add audio clip in swings with event handling  hello dear, i wanna to play audio clip in java program in JFrame in swings by event handling... how it can be done...... thanks alot
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 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
how to use mysql event scheduler in hibernate
how to use mysql event scheduler in hibernate  Hi all, I am creating... of time, i need to use mysql event scheduler My query is like this create event...("); it gives native batch update Exception How can resolve this problem can
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
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
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
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
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...; -(IBAction) stop:(id)sender; -(IBAction) pause:(id)sender; @end
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

 
Advertisement null

Ads