How can avoid to close the window?

My problem is that when user decides to close a window, system should ask conferm to that action, if user responds no, the window should stay, vice versa window should be closed if user conferm closing.
Ok my code:
void this_internalFrameClosing(InternalFrameEvent e) {
int r;
this.setClosable(false);
JOptionPane dlg = new JOptionPane();
r = dlg.showConfirmDialog(this,"Are you sure to quit?","Quit?",dlg.YES_NO_OPTION);
if (r == dlg.YES_OPTION) {
this.setClosable(true);
doesn't work. How can I cancel closing of the window, because window will be closed anyway!

This will prevent your internal frame from closing:
frame.setDefaultCloseOperation(JInternalFrame.DO_NOTHING_ON_CLOSE);
Then you have to define your closing logic in the internalFrameClosing() method of InternalFrameListener. Be sure to close the window manually using frame.dispose().

Similar Messages

  • I have hp 430 laptop,how can i re install the windows 7, if i not have original window on my laptop

    I have hp 430 laptop,how can i re install the windows 7, if i not have original windows on my laptop. i have oem number,
    But i have troubol to finishing installation of window.

    Originally the Notebook will have the Recovery Partition and that would give you an option to create a set of Recovery Disk. If you have not created those Recovery Disks when the Notebook was in working condition we cannot do that right now
    As of now if you need to recover your Notebook with the new Operating System you can check if the Recovery Partition is in a working condition or not, If yes you can easily recover/restore your Notebook
    If Recovery Partition is corrupted
    You need to call HP Technical Support and request for a set of Recovery Disks , So you can recover/restore your Notebook at the earliest
    OR
    You need call up Microsoft and purchase an Operating System with the License Key, So you can recover/restore your Notebook at the earliest
    I strongly recommend you to Contact HP Technical Support over the Phone for further assistance without any delay
    Hope this helps, for any further queries reply to the post and feel free to join us again
    **Click the KUDOS star on left to say Thanks**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.
    Thank You,
    K N R K
    Although I am an HP employee, I am speaking for myself and not for HP

  • A little white box appears in my browser window, and I am unable to do ANYTHING in Firefox, I can't even close the window.

    I am using Mac OSX 10.6.8, so I know that Firefox should be working. The very first time I downloaded Firefox, I was able to use it for about 20 minutes, and then I kept getting some kind of white box (just small) that would pop-up over top of the search bar. Once this box showed up, I was unable to do anything in the browser...I couldn't close it, search, choose "file"...NOTHING. I have uninstalled and reinstalled it multiple times, and it still doesn't work.

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • How can I open/close the switches of HP34903A independently via the subvi "HP34970A switch.vi"separated from "HP34970A GP Switch DEMO.vi" in HP34970A driver?

    I separated the subvi HP34970A switch.vi from the HP34970A GP Swich DEMO.vi in HP34970A driver. But I found that first I ran the subvi to close switch2 and switch3, then I ran the subvi to open switch3,but the result is both channels were open. Finally I found whenever you run the subvi HP34970A switch to close some switches, all other switches will be open. Can anyone tell me how I can open/close the switches of HP34903A independently?

    I use this VI and have no problem independently opening and closing the relays. Check that the Close Exclusive input is set to "Normal". Also, are you sure that the Channel List input only has a single entry? Using your example, the first time you run it, the channel list should be 102,103 with Open/Close set to close. The second time, the channel list should be 103 and Open/Close set to open.

  • Pavilion dv6 - How can I determine if the windows product key for Windows 7 is 64 bit or 32 bit?

    The hard drive in my Pavillion dv6 had to be reformatted.  I do not have a recovery disc nor a Windows 7 disc.  I do have a product key on the back of the computer for Windows 7 Home Premium.  How do I determine if I should install the 64 bit or the 32 bit version of Windows 7?  The product number is A3E82AV, Model dv6t-7000.

    Hi: All dv6-7xxx models came with W7 64 bit. That is what the license is for (although the product key would also work on a 32 bit OS). You can make your own W7 installation media and use that to reinstall Windows. Link to the W7 ISO file downloads is below. Download the applicable version of Windows 7 that is on your product key (Home Premium, Pro, or Ultimate).  The SP1 Media Refresh files are the latest ISO files. http://forums.mydigitallife.info/threads/14709-Windows-7-Digital-River-direct-links-Multiple-Languag... Use the Windows 7 USB/DVD installation tool to compile the ISO file you download from Digital River. Link  below. You need a DVD or a 4 GB flash drive to use the USB method of compilation. Use the 25 character windows 7 product key to activate your installation. http://download.cnet.com/Windows-7-USB-DVD-Download-Tool/3000-18513_4-10972600.html Then go to the PC's support and driver page to install the drivers you need.

  • How can we print using the windows printer dialog window?

    Hi,
    We recently got new printers and a printer setup on our server that are set to print in greyscale as a default. In the past the printers defaulted to printing in color. When I create VI's and reports I have used to set "Print on completion" or the print option from the Report Generation Toolkit, and I have received my prints in color. After changing the printer drivers on the server any printing method I used to do from LabVIEW will always produce greyscale prints. These prints are fine for everyday use, however we need color prints when the documents are for customers or for other official use.
    If I could only send documents/VI's to that process the user could override the "greyscale" setting and select "color" in the cases where we need a better looking print. Obviously the other option is to save the document/VI as a file and later print it from any windows software (Excel, Paint etc.).
    Do anyone have any neat tricks for printing using the windows printer dialog?

    You can change printer settings programmatically via a .NET assembly. You can also bring up the Print Dialog to change settings manually before printing.
    More info on the .NET assembly for colour settings here:
    https://msdn.microsoft.com/en-us/library/system.drawing.printing.pagesettings.color(v=vs.110).aspx
    An NI KB link on calling a print dialog:
    http://digital.ni.com/public.nsf/allkb/80DD23A28BD8ADF9862575AC0077B1BB?OpenDocument
    CLD

  • How can I throw away the windows

    In java programming of application,we have to choose a window to display something,for example a Frame.I want to know if I can design the window myself,for example ,making it look like a book or something else,not the windows of 98.

    Yes you can.
    You can use JWindow to display a window
    without a title bar, (blank) the rest is up to you...
    hope this helps

  • How does a servlet close the browser window?

    How can a servlet close the browser window it is running in?

    I'm running the servlet by calling it in a browser window, passing parameters using POST, with the parameters appearing at the end of the url.
    Is there another way to run the servlet, without it affecting the browser window? That would be a better solution.

  • How close the window

    I've tried to click the 'X' button in the window but the window frame don't close at all.
    here's the code
    public class test {
         public static void main(String args[]) {
         Frame frame=new Frame("Red VS Blue");
         frame.setSize(400,200);
         frame.setLayout(new GridLayout(2,0));     
         frame.setVisible(true);
    i'll like to know what's going wrong why can't i close the window frame and exit the application.
    hope someone can tell me the reason and how to solve it.
    thanks in advance

    You have now the code.
    And the reason is: you have to explicitly register a listener with your frame. And this listener must implement the windowClosing(WindowEvent) method in order to respond to clicking on the 'X' button.
    Here you can find some information about the event handling:
    http://java.sun.com/docs/books/tutorial/uiswing/overview/event.html
    And here is another tuttorial about swing and the MVC pattern:
    http://developer.java.sun.com/developer/onlineTraining/Downloads/SwingII.pdf

  • How can I switch between multiple windows of the same application (e.g. Safari) over several desktops ?

    Hi All,
    I have one application, for example safari, open and running with multiple windows (with or without tabs) spread over several desktops.
    How can I switch between the windows only via keyboard? CMD+> and CMD+< let me only swicht between windows open on the one desktop I am currently looking at.
    thanks for your replies,
    equi

    Barney,
    many thanks for your efforts and your time (preparing and posting the screenshot, answering to this question,...).
    Unfortunately, moving the focus to the next window only works with windows on the same desktop.
    btw, using a german keyboard layout and german language settings the shortcut is "cmd+<".
    I can switch with this shortcut between different windows of my Safari which reside on the same desktop, but I cannot swith between different safari windows distributed over several desktops.
    Thanks,
    equi    

  • How can I turn back the suggest option on iTunes when I purchase a song? somehow I close the window and now it doesn't come up

    how can I turn back the suggest option when I purchase a song? somehow I close the window that suggest the song similar to what we purchase on itunes

    NVM!!! Everything is strangely fine now!

  • How can I quit (close) Photoshop and keep all windows so that the next time I open Photoshop the fil

    How can I quit (close) Photoshop and keep all windows so that the next time I open Photoshop all the files that I had open are there already in the same position as when I closed Photoshop?
    I've been a Fireworks user for over 10 years and just switched to Photoshop. I cannot find a setting that will enable all my file windows to reopen when I quit Photoshop. This is really a problem since I often work on several files at the same time.
    Please let me know if the feature exists or point me to where I can post a message for a new feature to be implemented. The feature is a must for any designer working on large projects.
    Thanks!

    There is no such functionality. You could perhaps create a script that stores that info in a custom text file and arranges them accordingly in the workspace, but that's as good as it gets...
    Mylenium

  • In FF 3, Intellimouse ("5" buttons) back button closes only the current tab. In FF4 it closes the window. I prefer the former. How can I get FF4 to do that?

    MS's Intellimouse has five "buttons" including the scroll wheel. I set left and right buttons to L-click & R-click (seems normal). I set left side button to Back and right side button to Close.
    In FF3, Close closes the current tab and Ctrl-W closes the window. In FF4, this is reversed -- Close closes the window and all its tabs and Ctrl-W closes the current tab -- not my preferred behavior.
    The behavior switch in FF4 may or may not have been a function of what somebody had for breakfast. It is was, then I'd like it switched back. If there was an important reason for the switch, I'd like to know.
    Until FF4 reverts to FF3 behavior, I'm probably stuck in FF3.
    In anyhow, thanks -- John Linford, Fort Worth

    Harley, thank you so much. I'll reload FF4 and re-set the settings.
    John

  • How can I turn off the Download pop up Window from displaying when downloading a file?

    How can I turn off the Download pop up Window from displaying when downloading a file?

    To not display the built-in Firefox downloads window, Tools > Options > General tab, un-check "Show the <u>D</u>ownloads window when downloading a file". See: http://support.mozilla.com/en-US/kb/Options+window+-+General+panel
    If you have some other download manager installed, you will need to see the documentation for the download manager.
    <br />
    You have installed plugins with known security issues that should be updated. To see the plugins submitted as part of your question post, click "More system details..." to the right of you original question.
    *Shockwave Flash 10.1 r53
    *Next Generation Java Plug-in 1.6.0_18 for Mozilla browsers
    #'''Check your plugin versions''': http://www.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #'''Update Shockwave Flash'''
    #*Use Firefox to Download and SAVE to your hard drive from one of the links below; '''<u>the links take you directly to the download and you avoid the "getplus" download manager and "extras" (i.e., toolbars, virus scan links, etc.) on the main Adobe page.</u>'''
    #*SAVE to your Desktop so you can find it
    #*After download completes, close Firefox
    #*Click on the file you just downloaded and install
    #**Note: Vista and Win7 users may need to right-click the installer downloaded and choose "Run as Administrator"
    #**Note: Most browsers other than IE will also get updated with this one download
    #**Note: To update IE, same procedure '''<u>but use IE</u>''' to go: http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_ax.exe
    #*After installation, restart Firefox and check your version again.
    #*'''<u>Download links and other information</u>''':
    #** https://support.mozilla.com/en-US/kb/Managing+the+Flash+plugin#Updating_Flash
    #** '''<u>or</u>''' you can download, save, then run the manual installers for IE, then for Firefox (and all other browsers) from here: http://kb2.adobe.com/cps/191/tn_19166.html#main_ManualInstaller
    #* Also see: http://support.mozilla.com/en-US/kb/Installing+the+Flash+plugin
    #* Also see (if needed): http://kb2.adobe.com/cps/191/tn_19166.html#main_Uninstall
    #'''Update Java:'''
    #* Download and update instructions: https://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox
    #* Removing old versions (if needed): http://www.java.com/en/download/faq/remove_olderversions.xml
    #* Remove multiple Java Console extensions (if needed): http://kb.mozillazine.org/Java#Multiple_Java_Console_extensions
    #* After the installation, start Firefox and check your version again.

  • Firefox 18.0.1 crashes every time I close a tab. How can I revert to the prior version which worked fine?

    I use Windows 7 on a HP Pavilion dm4-1160us Entertainment Notebook. I use Firefox extensively, and have not had this problem with any prior versions. I upgraded to 18.0.1 on Jan 18th and now Firefox crashes every time I close a tab. I use Norton Internet Security, and had no problems prior to updating Firefox. How can I revert to the prior version of Firefox which worked well.

    Why is this Norton's problem when it was caused by Firefox's upgrade???
    An easier solution is to use a different browser. Norton works fine.

Maybe you are looking for

  • CUCM 8.6 - 8961 "Phone Not Registered"

    Hi, I can't get my 8961 to register to my CUCM 8.6. My 7941 registered without a problem. I verified that I correctly entered the MAC Address. My 8961 can reach the TFTP server and get its TFTP file. Status Messages: 00:41:37 VPN Error :VPN is not co

  • "filename.aif" is empty! error message when importing long mp3 file

    hello everyone, I am having issues importing large mp3, and even .aiff files into garageband. when I try to import a file that is around 4 hours long - garageband goes through the process of "importing" "converting" and then right at the end - it giv

  • Passing an dataset to a report causes VB 6 application crash

    The problem is around the crdb_adoplus.dll Passing parameters from VB 6 application to Crystal object to generate report. Normally if i run the report there is no problem. but if i open any other .net application which uses memory, my application sud

  • JMS JDBC Store in OC4J ?

    Hi, does anybody know if I could configure JMS JDBC Store under OC4J ? It is possible to be done under WebLogic 6.1 (I believe Oracle uses for this purpose Advanced Queue). What about support of other JMS providers, like SonicMQ ? Is it possible to i

  • Urgent!!!Want to add different panels in different rows..

    i am trying to add different Panels in differnt rows of same column.. But each time i am getting the default panel which is being retuned by the MyTableCellRenderer class which i have implemented from TableCellRenderer . Would you like reply whats wr