How do I stop the Close Operation of JFrame

I want to stop user to close my frame on click of window close icon. How do I stop this operation.
Dinesh

Hi,
Just add this in ur code
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);

Similar Messages

  • Stop the close of active document...CS3

    Hi,
    I m new to plugin development. I m using Indesign CS3 on MAC OS.
    How do i get the reference(UIDRef) to the active document?
    I want to stop the close operation of this document... I have disabled the close menu... But want the close button also to be disabled...
    Should i implement IDocFileHandler? or is ther any other way?
    Can someone please guide me...
    Thank You.

    You need to overshadow the default doc file handler. Here's a few hints: <br />1. Implement your own. Have a good look at InCopyDocFileHandler.cpp in the SDK<br />2. install in on the kDocBoss, store a reference to the original<br />>AddIn<br />>{<br />>     kDocBoss,<br />>     kInvalidClass,<br />>     {<br />>          IID_IMYDOCOBSERVER, kMyDocObserverImpl,<br />>          IID_ORGICLASSIDDATA, kClassIDDataImpl,<br />>     }<br />>};<br /><br />3. Be nice to others. In your docfilehandler remember to pass on all call on the original handler, less the one's you want to intercept. An example:<br />>InterfacePtr<IClassIDData> orgDocFileHandlerData(doc, IID_ORGICLASSIDDATA);<br />>ASSERT_INTERFACE(orgDocFileHandlerData);<br />>ClassID anID = orgDocFileHandlerData->GetClassID();<br />          <br />>InterfacePtr<IDocFileHandler> orgDocFileHandler(INVUtils::QueryDocFileHandler(anID));<br />>ASSERT_INTERFACE(orgDocFileHandler);<br />          <br />>return orgDocFileHandler->CanSaveACopy(doc);

  • When i update my Mac, I get an Installation alert that in order to continue installation, please close the following application: iTunes. how do I stop the installation and close iTunes?

    When I update my Mac, I get an Installation alert that in order to continue installation, i need to close iTunes.  How do I stop the installation and how do I close iTunes?

    That sounds like the latest  iTunes Version 11.1.5 update.
    To continue the installation you must first Quit iTunes.
    To Quit iTunes, use
    or

  • How do you stop the flash player when you change pages on a web site

    Hi all;
    I'm building a website in flash using my limited understanding of action script.  Everything was progressing very well until I found that if I go to one of my example pages of my web site and play the flash video (with audio) and click back to my "home" button, the audio will continue to play.  If I go back to the example page, the video is off and when I start the video, it plays again with the other audio.  I hear the audio twice! I know there is an action script to handle this but, I can't figure it out.
    My question is, How do I stop the audio when I click away from the example page back to the home page or any other page?
    Thanks in advance for your help.
    I'm usinf Flash CS4 and a Mac OS operating system.

    The problem is most likely in your Action Script. Therefore this question should be posted in the Action Script forum. This forum only deals with the Flash Player, which, in this case is running the script as it is written, and therefore, working properly.

  • How can I stop the execution on a JSP page and start it again

    Hi
    I am making a program that simulates how to manage transactions when accessing a database by using locks. I have run into a problem and I hope someone has the time to help me.
    When a user does an update the transaction commits and releases its locks when the program executes
    <%stmt.executeUpdate("commit!"); %>
    I need to put a break in to stop the program executing this statement, to illustrate the lock is set correctly.
    I have tried to put in an alert box but this does not prevent the rest of the java code being executed.
    I have tried to use prompt boxes, JavaScript functions, but these functions cannot have any java code in them.
    I have tried using the java.swing JOptionPane boxes but this didn?t work either
    I have tried to get input from the user but I don?t know how to retrieve this data on the same page. (As far as I know you have to use submit and even refresh the page or retrieve it on the next page).
    Does anyone know how I can stop the execution on a JSP page and start it again (on same page)
    Mette

    I already have another client (Tomcat jsp application) running and it throws a SQLException correctly when I don�t put in a commit=true statement and don't close the database connection.
    But the problem is how to get the code above to stop to illustrate I have set this lock.
    I have tried to use the JOptionPane but because my program is running in a web browser I cannot use the JOptionPane dialog box.
    I have tired using an alert box but it executes the commit statement before the alert box is dispayed. So this does not work
    While (i < 2)
    if( i==1)
    %>alert(�The transactions commits when you press Ok�); <% //what it to stop execution here
    else
    stmt.executeUpdate(�commit�);
    I am not using threads so I cannot use the sleep function.
    I am using mysql and have already configured it to detect deadlocks and how long to wait for locks.
    Thanks for your help
    Mette

  • How do I stop the constant stars coming out of the firefox symbol - please help - they are driving me crazy

    ''locking this thread as the Owner of this thread answered in the related thread''
    starting today when I clicked on firefox on my mac, there are blue stars constantly coming out of the firefox symbol and they are annoying and driving me crazy. How do I stop the constant stars coming from the firefox symbol? please help

    You can use these steps to disable the snippets on the about:home page:
    * Set the <b>browser.aboutHomeSnippets.updateUrl</b> pref to an empty string on the <b>about:config</b> page
    * Open about:home page in a tab
    * Open Web Console in this tab (Firefox menu button or Tools > Developer)
    * Run this command via the command prompt: <b>gSnippetsMap.clear()</b>
    * Close the tab with the about:home page
    * Close and restart Firefox

  • HT5624 I don't want Icloud.  I believe it drains the battery of my phone.  How do I get the old operating system back on my new iphone 4G?

    I just got a new upgrade iphone from a 3G to 4G.  My son updated the software with Icloud.  I do not like it, it drains my battery.  How do I get the old operating system back (without icloud).  Also, I don't know how to close an APP anymore and I think that could be draining my battery as well.  It doesn't work the same way when I doubled click and then touch the APP it doesn't give me a dash to close it up again.

    Apple does not support downgrading the iOS.
    As for icloud, go to   Settings>icloud, scroll to bottom of screen and tap Delete Account.
    As for battery drain... 
    Look through this...
    http://osxdaily.com/2013/09/19/ios-7-battery-life-fix/
    Also, Settings>General>Background App Refresh:   turn off apps you don't want refreshing data - this can preserve battery life.
    Also try a reboot:  press and hold the home and power buttons until the Apple icon is displayed, then let go.

  • How do I stop the Adobe Popup when printing?

    I am constantly creating PDF files using Adobe Acrobat Professional 7.0. I create from multiple programs: Office Word, Excel, Paint, Etc. as well as AutoCADD.  I create them using Adobe as a printer, thus printing to PDF. Once the PDF has been created from the other program via printing to Adobe, the new PDF file pops up for viewing. I am ok with this; however I then click onto another program and after a few second the PDF pops up again. Even if I close it a few seconds later it pops up again. When I am printing multiple sheets out of a program I am jumping back and forth and the popup feature slows me up big-time or causes me to mess up the files I am working with.
    How do I stop the Adobe Popup?

    That fixed the problem of the printing taking over the screen multiple times. I would like to have a solution where the finished file shows "PDF results" once, letting me know that the file has been created successfully, then let me get back to another program. Maybe this can be an upgrade with the next version.

  • How do I stop the task panes from opening automatically when I open a PDF?

    How do I stop the task panes from opening automatically when I open a PDF?
    When I open some of my PDFs the task panes open too. I do not want them to as I have never used them in reader for any purpose. I use reader to READ PDFs. I don't need the task panes and don't want them opening when reader starts.

    Adobe seem to have decided that they are so important that you must see them. Perhaps because it is their chance to sell you stuff. It seems to vary between releases, are you on the latest? Curiously, many people have no idea how to open and close these panels.

  • How do I stop the spinning ball that keeps going and going and going

    How do I stop the spinning ball that keeps going and going and going.  I think I have to remove cookies, but I don't know how.

    I think I solved it.
    I searched my extensions folder (in my profile) for all image files (PNG and JPG), and found the pop-up images to be in an extension folder related to Firefox Sync (not an external extension, actually). But even though I had already disabled it and un-linked this computer from Firefox Sync, the message still popped-up.
    I think the image filename was SYNC.PNG, or something like that. Close Firefox, find the folder where that image is in, and rename the main folder (the one right under the extensions folder) to some other name (such as "original name_copy"). Then start Firefox. Check if it works OK and if the pop-up ceases to appear. If everything OK, then you can delete that folder.
    If something goes wrong, just rename the folder to what it was before.

  • HT201365 How do I stop the running of programs in the background?  The old way of doing it doesn't work now.

    How do I stop the running of programs in the background?  The old way of doing it doesn't work now.

    How to Close Apps
    Double Tap the Home Button... Then swipe the App (not the icon) Upwards... Tap the Home Button when finished.
    From Here  >  http://support.apple.com/kb/HT4211

  • How can i stop the upgrade message appearing everytime i open iphoto?

    How can i stop the upgrade message appearing everytime i open iphoto?
    It's getting ridiculous that every time i open iphoto that it insists in being upgraded and repaired. Anyone know how i can get rid of this without reinstalling it?
    Thanks

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • How do I stop the Mac Store app from opening whenever I start my computer?

    How do I stop the Mac Store App from opening upon startup of my Mac Book Pro?  It will not let anything else open and then it stalls when I try to close the window.

    Deselect that option and the check mark will disappear.

  • How do I stop the toolbar from dropping down when I load a program?

    How do I stop the toolbar from dropping down when I load a program?  When  I close a program Like world or Warcraft for example the toolbar keeps opening up when the World of Warcraft manager reopens How do I stop this for this and other programs
    I use, its really annoying and should be fixed or a setting made to stop it from doing this entirely.
    KingOfMyPC58

    Hi,
    Could you please share a screenshot here with us for better understanding this issue.
    Regarding to “other programs”, what are these programs, more detailed information would be very helpful.
    Regards,
    Yolanda
    Yolanda
    TechNet Community Support

  • How can I stop the sharing on the iPhones that are in the same account because its sharing every thing even text messages

    How can I stop the sharing on the iPhones that are on my account because its sharing everything even text messages and its driving everybody crazy

    An icloud account is designed to be used by one user to keep his/her devices in sync. 
    If you have muitiple family members or friends using the same account as yours, then have them get their own Apple IDs and icloud accounts.
    If you mean you want to stop the sharing between all your devices, then on any one device, go to Settings>icloud and turn off the services you don't want that device to share/sync.  Or turn off icloud altogether if that's what you want.

Maybe you are looking for

  • My playlist no longer exist

    Last night I was downloading new songs for my ipod mini and i connected it to my computer to transfer the songs but when i checked the ipod there was no songs, not even one. I dont know what happened! and the message says that my playlist no longer e

  • Is there a plug-in for cropping movies?

    Is there a plug-in for cropping movies? I asked this question a few months ago, and someone suggested a plug-in that turns everything outside a cropping window into a background color. I would like to be able to do true cropping. I hope it's not nece

  • How can I download an audiobook so it goes into audiobook file and not music

    how can I download an audiobook so it goes into audiobook file and not into music ? thanks

  • How do I create a JPG image from a clip

    I need to create a jpg image from a movie clip. Is making a freeze frame the same and creating a jpg?

  • Mail Slow, re-downloading messages

    Mail has worked very well for me for quite some time---but over the last week or so I've been having a lot of problems. Symptoms: When I open mail I typically see only messages that came in 2 or 10 or 24 hours ago. Very slowly more recent messages wi