Closing the window

Hello all,
Thanks to those who helped before to get the dialog box to open. (I'd never used Swing before, so I ended up learning quite a bit<g>)
At any rate, I've run into another silly snag, I can't get the app window to close.
I've tried the dispose, close, etc.
Any ideas?
Thanks much,
Strahan.

Add this windowListener to the app window .
The point here is to close the window the window event
is "windowClosing" instead of "windowClosed"Depending on how your manage the resources for your gui, you may want to split the closing into two pieces. Definitely windowClosing needs to call dispose. You may want to move the System.exit call into the windowClosed handler. The distinction is maybe a bit obscure, but in applications with multiple windows you'd always want windowClosing to dispose of the window, but you'd only want some common manager object to decide when to exit the application. In windowClosed you could notify that manager, and (for example) it could decide to call System.exit after the last window had closed.

Similar Messages

  • When I close and reopen firefox, it restores my tabs, but it restores tabs from hours or days ago, not the ones that were open when I closed the window - why?

    I normally keep my Firefox window open for long periods of time because I have a lot of active tabs. When I close the window and reopen it, I am still able to restore tabs, but as of a few weeks ago, it has stopped restoring the most recent version. Normally, when I would close and reopen, the tabs would be the same ones that were open when I closed the window. Now, it restores to a version from a few days ago instead of the current version. I have to revert to pulling my more recent tabs out of the recent history. I checked my options and I can't figure out any way to control this. How can I fix it so that I can count on my Firefox window to restore the tabs that I actually care about?

    You can check for problems with the sessionstore.js and sessionstore.bak files in the Firefox Profile Folder that store session data.
    Delete the sessionstore.js file and possible sessionstore-##.js files with a number and sessionstore.bak in the Firefox Profile Folder.
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost, so you will have to create them again (make a note or bookmark them).
    *http://kb.mozillazine.org/Multiple_profile_files_created
    *http://kb.mozillazine.org/Session_Restore

  • How can I add comments in genius bar reservation after closing the window?

    I was typing my additional comments in the genius bar reservation for servicing my Macbook Pro but i accidentally closed the window. Is it possible to get back to the reservation window and type in my comments??
    Thanks a lot.

    Call the Apple store where you are having your computer serviced.  Give the comments over the phone.

  • I was trying to change my password and somehow it automatically reset the password for me and I closed the window and now I can't log in. What do I do?

    I was trying to change my password and somehow it automatically reset the password for me and I closed the window and now I can't log in. What do I do?

    HI,
    This post in in iChat (forum) but I have no idea from what you posted if it is about iChat and if so what account type you were changing the password on.
    9:25 PM      Wednesday; June 12, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.4)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • How to clear sessions in java while closing the window

    Dear all,
    When I am closing the window if I click 'x' on window how to handle that event in java script , or any other way for this event handling.
    Sudheendra.

    Thank you very much ,
    In my application for each login i am using different sessions.
    In one login if a user navigating then there is no chance of opening different windows.
    So when the user without clicking logout button , if he closes the window by clicking 'x' , then the session allocated for this login is retaining until the session time out.
    so i want to invalidate the session for this particular login .
    Thank you,
    Sudheendra.

  • Mx.core.Window - prevent user from closing the window?

    Hi,
    mx.core.Window has properties 'maximizable' &
    'minimizable', but there doesn't seem to be any 'closable'
    property. In my application I'm creating another window (apart from
    the main application window) that needs to be open the whole time
    the application is running. If I can't prevent the user from
    closing the window, then I'll have to rig up some code to
    automatically re-open it if the user closes it. I'm hoping there's
    a way to prevent the user from closing the window in the first
    place though.
    I'll much appreciate any ideas - thanks :)

    Listen for the window's closing event and call
    preventDefault().

  • Quitting the Application Before Closing the Window?

    I have a 6 day old iMac running Snow Leopard. I already knew that closing the window on most Apps did not close the program, so instead of closing the window, I would just click on, ie, "Quit Safari" and the Safari window would then close. I don't do that anymore, now I close the Window first, and then quit the App. Could I have caused any harm to the OS by just quitting the App, and letting that close the window?

    It's OK to close the app without closing the window. I never close the windows when quitting an app, I just hit CMD-Q. It does no damage.
    Regards,
    Captfred

  • Display Do u want save changes or not? message while closing the window

    Hi All,
    I have one requirement.I developed one form that contains 4 windows.
    I entered in the 3rd window and i have made some changes but not saved.when i close 3rd window it is not giving any message like 'Do u want save changes?'after closing the 3rd window cursor will go to 2nd window.if i open 3rd window again it is propmting the message(Do u want save changes or not?).How can i get this message while closing the 3rd window?
    i have written the following code in app_custom body
    IF (wnd = 'WINDOW1') THEN
    app_window.close_first_window;
    ELSIF (wnd = 'WINDOW3') THEN      
    lv_wnd_status := get_window_property('WINDOW2',VISIBLE);
    IF lv_wnd_status = 'TRUE' THEN
         go_item('BLOCK2.ORDER_NUMBER');
         set_window_property ('WINDOW3', visible, property_false);
    ELSE
    app_window.close_first_window;
    END IF;
         ELSIF (wnd = 'WINDOW2')
    THEN
    lv_wnd_status := get_window_property('WINDOW3',VISIBLE);
    IF lv_wnd_status = 'TRUE' THEN
    set_window_property ('WINDOW2', visible, property_false);
    ELSE
    app_window.close_first_window;
    END IF;
         ELSE
    app_window.close_first_window;
    END IF;
    Can anyone give me some idea.
    Thanks in Advance
    Edited by: DhanaSurya on Apr 27, 2010 9:41 PM

    Iis this the only code which you used to hide/display window?
    Might be some navigation is happening in your form. Like if there is relationship between window2 and window3's block and when you access the window2 then you try to move to the next reocrd and then you are try to go to the WINDOW3's block.
    Or there is any CLEAR_BLOCK built-in bieng use in you form.
    -Ammad

  • Submitting values to the same popup window and closing the window after upd

    hi,
    i have a jsp page called index.jsp.
    in that jsp page i have an hyperlink..if i click on this it opens a popup window.in this popup window we have some values allowed to user to modify.after entering the values in popup window he clicks update then the values are updated and the window is closed and the index.jsp page is refreshed.
    how can do this.
    i want tried in this way but i failed..
    first time when i open the window i kept a flag as hidden field false..
    once the user clicks the update button after entering the value then i make the flag as true and submitt to the same page..now iam updating after immediate update i want to close the window..its not closing.
    if(!flag)
    display fields with update option
    }else
    rtreieve the values
    update in database.
    <script>
    window.opener.refresh;
    window.close();
    </script>
    }

    I had a similar problem. I resolved it by making use of IFrames.

  • Black window remains open even after closing the window programatically

    I have an application which has multiple windows. From mainwindow button click event I am closing the child form of the application. The child window is opened after a successful socket, serial or gateway connection attempt, after which the application
    do work with some threads and while clicking on a button on mainwindow I am closing this child window after disconnecting the respective connection mode. But after the close event the child window background gets black and it remains open unless and until
    I just do a minimize and maximize the application. Please help me on this to get this issue fixed.

    Well the details are rather going to depend on what it's doing.
    It's a very open ended question really.
    But...
    Your options include.
    Background worker.
    https://msdn.microsoft.com/en-us/library/cc221403(v=vs.95).aspx
    DIspatcherTimer
    https://msdn.microsoft.com/en-us/library/system.windows.threading.dispatchertimer(v=vs.110).aspx
    Async Await
    https://msdn.microsoft.com/en-us/library/hh191443.aspx
    Tasks
    Task.Factory.StartNew(() => { Dosomething(); });
    Or just a plain thread
    using System.Threading;
    new Thread(() =>
    Thread.CurrentThread.IsBackground = true;
    // DoSomething();
    }).Start();
    Where DoSomething is a method.
    You can also have inline code of course instead of a method.
    Whilst on a different thread to the UI you can't update UI objects.
    You'll get a thread affinity error message if you try.
    That means you either return your results to the ui thread and process them there ( particularly convenient with async await ).
    Or you update something which doesn't have thread affinity.
    An observablecollection bound to an itemssource doesn't have thread affinity eg.
    You do need to raise property changed at the end of your processing with that option because it notifies collectionchanged on the wrong thread and the UI won't know it changed.
    Or you can dispathcher.begininvoke to get back to the UI thread.
    All depends what you're doing but hopefully one of those options there will suit you.
    Hope that helps.
    Recent Technet articles:
    Property List Editing ;  
    Dynamic XAML

  • I accidentally closed the window and I can't restore my previous tabs

    I tried to restore the window but my tabs didn't come back. I hadn't closed Firefox and it didn't crash, so the auto recover has nothing to do with it.

    Did you check if you can reopen that window via History > Recently Closed Windows ?
    * http://kb.mozillazine.org/Session_Restore

  • Closing the window at runtime

    Hello ABAPers,
    Is there a way in ABAP WD to make a call to wddoexit to end the application. Or rather when I trigger an action I want this to behave just the way when a window is closed?  Any approach to do this would save my day.
    Aravind.

    Hi Aravind,
    You can create a button and on click of it you can raise an event which fires the exit plug of the window. You can also write the code to close the window. See the following threads:
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/04a5421935c511e10000000a1550b0/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/04a5421935c511e10000000a1550b0/frameset.htm</a>
    <a href="/people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications:///people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications
    Re: Close Window
    Best regards,
    Suresh

  • Backend BSP session not closing on server after closing the window

    Hi All,
    We have SAP EP (7.0 SP21) and there is a BSP transaction ivew (Interaction Center ) intergrated in the portal. The issue is when the user performs any transactions inside the BSP and then closes the browser, session remains on the server till the timeout. Is there a way to end those sessions on server after closing the browser immediately?
    Portal domain : xx.mycomp.com
    ABAP system domain :mycom.com
    Should the domains be same for the DSM of Portal to work or is there any solution that can be considered.
    regards
    Uday

    Hi Uday,
    These are the main issues that can cause issues with DSM:
    JavaScript Origin Policy:
    Scripting
    between different domains is not allowed because of “JavaScript origin policy”.
    Also
    communication between mixed protocols (http\https) is forbidden.
    Therefore
    the portal server and the content server must be on the same domain and must
    use the same protocol.
    For
    detailed explanation see:
    http://mozilla.org/projects/security/components/same-origin.html
    Popup Blocker:
    •Popup blockers may cause troubles
    in relation with SRA feature.
    •Terminator handles notifications in
    new window when current window is being destroyed (logoff, closing browser
    window) – popup blocker prevents the opening of new window, hence no session
    handling performed.
    please also check SAP Note #596698 for more information typical problems and troubleshooting.
    In general, the 2 domains should be the same.
    xxx.mycomp.com, meaning that first part of the url can change but what comes after should be the same domain.
    Best regards,
    Etay

  • When Closing the window giving error " Virtual Column not allowed"

    Hi All,
    In my main block, i have a button, on clicking which will open a new window(block) with a free text field to enter.
    I have a Save button in a new window which will save entered text fiedl and refresh the main block to see the value entered in a new block.
    But suppose, if entered something in text field and without saving if i close the window and try to exit from the form
    It is asking me to save the form or not and if i press Yes
    Then it gives me below error
    ORA-01733: virtual column not allowed here
    FRM-40508: ORACLE error: unable to INSERT record.
    If i see from Display database error' It is trying to insert the record into the view On which my new block has based( i know it is not possible).
    Any suggestion on this please?
    Thanks,
    pavan

    Pavan,
    How are you populating your block? It sounds like you are populating the block manually (eg; Looping through a cursor and assigning values to each row of your block). If this is what you are doing, then YES you will get these kinds of errors. Ideally, you should base your data block on your data (either directly on the base table or view of if you are using a query, then a FROM Clause based block).
    I'm guessing here, so would you mind posting a description of your data block(s) is/are set up?
    Craig...

  • Once Again: Closing the Window

    I have searched the threads high and low and tried everything
    that I know to try.
    I am wanting to have a button trigger the window.close() to
    close the presentation window but it's not wroking (imagine
    that...). I have tried the straight code in the button exectute -
    window.close(); - as well as calling a script on the page to do the
    same thing. I get a prompt that Flash is trying to do something
    siniser but the global Flash security settings are set to allow all
    locations to run the command; I shouldn't even be seeing the
    security prompt.
    This is happening with Flash 8 and 9.
    BTW, the close presentation at movie end does not work,
    either.
    Any ideas appreciated. I guess I'll toddle over to the Flash
    forum to see if this is a known issue.

    Hi all
    I'm a bit confused. I've been testing this today using my own
    preferred method, which is as follows:
    1. Configure the Project > Preferences... > Start and
    End tab > Project end options Action: to "Close project".
    2. Create a blank slide at the end of the project that has
    nothing on it. Configure this slide for .1 seconds.
    3. Create a button or click box that points to the last
    slide.
    I've been testing this quite a bit this afternoon in partial
    response to this post. So far, the only way I've been able to see
    any weird behavior is in IE7, where I'm prompted as to whether I
    want to close the page I'm viewing. I've tried linking different
    ways, creating .EXE output and running the .SWF directly and all
    seem to work with no issues. I've been testing on IE7 as well as
    Firefox.
    Cheers... Rick

Maybe you are looking for