Closing previous windows problem

i have one desktop gui application..when I compile my application,then i can see searchform1 form,then when i click DELETE button in searchform1.form then I do see Delete.form and i can the remove the file from the list that i selected.The problem is when i click delete button i can see deleteform again BUT I could not close the previous windows like searchform1.java window and previous delete.java window(or form) which I have seen before .I wanna close previous window when i click delete.form..I meant i wanna close searchform1.form or the previous windows (forms) when i see delete.form or when I click delete button. I do believe that because of that problem , I had seen " Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space " after I saw a couple of forms.
Thank you so much for your helps..

altayli wrote:
This is my codeThat is not an SSCCE. Please read [this link|http://sscce.org].
But judging from that snippet, you're creating a new "noresult" (which I assume is a JWindow or JFrame?), then immediately disposing of it, without even displaying it. This is NOT closing any previously-opened noresult instances, which I am starting to think is what you want to do. You need a reference to a previous noresult if you want to close it.
Also, you shouldn't be calling DesktopApplication2.main(), this is very bad practice. You likely want to call DesktopApplication2's constructor if it is a JFrame/JDialog subclass, and setVisible(true) the result; if it's not a JFrame or JDialog, you want to create whatever main window it does create, and display that.
What if DesktopApplication2 calls System.exit() somewhere? Your application would go down with it.

Similar Messages

  • Alt + click not closing previous window?

    Hi,
    I have just been upgraded to 10.5 at work (hey we're at the cutting edge here you know! ) and I now can't do an alt+click to open a file/folder/app and close the folder it was in?
    It worked in 10.4 and I can do it on my personal mac that runs 10.6 so I'm sure I can do it but don't seem to be able to set it up.
    I've been trying to change my finder preferences switching 'always open folders in a new window' on and off and sometimes it seems to do it then not?
    HELP?

    >Exit plugs do not work in a portal environment.
    This is a good point that I feel silly for not remembering...
    You can check if your application is running in the portal using the IF_WD_APPLICATION->GET_CLIENT_ENVIRONMENT method
      lo_api_componentcontroller = wd_this->wd_get_api( ).
      lo_api_application = lo_api_componentcontroller->get_application( ).
      l_client_environment = lo_ap_application->get_client_environment( ).
    if it is - then you can use the IF_WD_PORTAL_INTEGRATION interface
    lo_portal_integration = lo_api_componentcontroller->get_portal_manager( ).
    and the you can use the IF_WD_PORTAL_INTEGRATION methods to navigate eg - NAVIGATE_ABSOLUTE
    call method lo_portal_manager->navigate_absolute
        exporting
          navigation_target   = 'ROLES://portal_content/blah/test_URL'
          navigation_mode     = if_wd_portal_integration=>co_show_inplace
    If you're navigating in the portal you should probably have iViews set up for the apps you are calling, but it is possible to create a pass-through iView which will redirect to a URL passed as a parameter.
    [Setting the URL at Runtime - in URL iVIew|http://help.sap.com/saphelp_nw04/helpdata/en/45/85087d755d1f88e10000000a1553f6/frameset.htm]
      data lo_api_component  type ref to if_wd_component.
      data lo_portal_manager type ref to if_wd_portal_integration.
      data lt_params type wdy_key_value_list.
      data ls_param type wdy_key_value.
      lo_api_component = wd_comp_controller->wd_get_api( ).
      lo_portal_manager = lo_api_component->get_portal_manager( ).
      ls_param-key = 'forcedURL'.
      ls_param-value = 'http://www.google.com'.
      append ls_param to lt_params.
      call method lo_portal_manager->navigate_absolute
        exporting
          navigation_target   = 'ROLES://portal_content/blah/test_URL'
          navigation_mode     = if_wd_portal_integration=>co_show_inplace
          use_sap_launcher    = abap_false
          launcher_parameters = lt_params.
    Hope this helps
    Chris
    Chris

  • Problem in Closing Browser window from an Applet.

    I have wriiten a small Applet progarm that calls a Javascript function in the opening window, to close the window in which it is loaded.The Applet window is a PopUp window from one of my application's window.
    First time I start my application and load that Applet and then close the frame window,it works fine that the browser window will close, when the frame window is closed.It calls the window closing event in that applet stop method is called and In stop methd a closeLaunchedBrowser method will called this has a Javascript method and the Method closes the window using the self.close() method.
    But now if I continue this process of launching applet and then closing frame window, initial 1 or 2 steps it has know problem when I continue this, after 3 or 4 steps, it result in browser hang/crash.
    I am using java version 1.4.2_01 or higher and IE or Firefox(any other NetScape based) browser to load applet.It works fine with IE but getting problem in case of Firefox(any other NetScape based).
    The error dialog information and related event log generated is shown below :
    The dialog which is displayed before crashing of firefox has information :
    "firefox.exe has generated errors and it will closed by windows.you will need to restart the program.
    An error log is being created."
    The error log information :
    Source : Browser Event ID: 8032
    "The browser service has failed to retrieve the backup list too many times on transport \Device\NetBT_Tcpip_{611A64A2-8F4B-409E-9AB2-0D9BF741E791}. The backup browser is stopping.
    The code related to this is given below.
    import javax.swing.JApplet;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import netscape.javascript.JSObject;
    public class TestApplet extends JApplet {
    protected JSObject win = null;
    private JFrame frame = null;
    private boolean alreadyClosed = false;
    public void init(){
    this.win = JSObject.getWindow(this);
    frame = new JFrame("Test Frame");
    frame.setSize(300, 400);
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.out.println("windowClosing");
    TestApplet.this.stop();
    frame.show();
    public void stop() {
    if (!alreadyClosed) {
    alreadyClosed = true;
    closeLaunchedBrowser();
    System.gc();
    System.runFinalization();
    private void closeLaunchedBrowser() {
    final TestApplet thisObject = this;
    Runnable r = new Runnable() {
    public void run() {
    try {
    JSObject win = (JSObject)JSObject.getWindow(thisObject);
    if (win != null && win.toString() != null) {
    //win.eval("top.opener=self;self.close();");
    //win.call("close", null);
    win.eval("self.close();");
    } catch (Exception e) {
    Thread t = new Thread(r);
    t.start();
    }If any one know solution regarding how to aviod this crash of browser please let me know. I will be very thankful to you.
    Thanks.

    Right, I sort of tracked down some code that uses getMethods to allow me to invoke a Javascript command. It is not pretty and took a little bit of editing to get to work but it does the job without putting JS stuff into my HTML.
    However it is causing some problems. If I open one of my other applets it will only let me close that window and the previous applets ceases to respond at all. I think this may be because the invoke gets the JSObject which is the window and somehow having more than one applet open in different windows is causing it to get confused and is locking the first window and only responding to the second.
    I have seen a much simpler method that uses:
    import netscape.javascript.*;
    and JSObject to get the window but my compiler complains about the import. Any further suggestions or an example would be welcome as my current solution is a bit limited as you can effectively only have one window open at a time which doesn't suit my needs.
    Many thanks.
    Mark.

  • I accidently closed my window with all my app tabs, now the only window that opens was a 2nd one I had open. How do I get back all my app tabs from the previous window, and why didn't it give me the usual warning you are closing more than one tab?

    I accidently closed the window with all my frequently used app tabs, now the only window that opens was an extra one I had opened. How do I get back all my app tabs from the previous window, and why didn't it give me the usual warning you are closing more than one tab? edit
    Details

    Then the (App) tabs from that window are lost unless you can restore an older copy of the sessionstore.js file (Time Machine?) that has that lost window.
    *http://kb.mozillazine.org/sessionstore.js

  • When I'm trying to add files to media, the program is suddenly closed by windows and says that can not find solution to this problem...

    when I'm trying to add files to media, the program is suddenly closed by windows and says that can not find solution to this problem...

    Hello Wyodor,
    thanks for your reply on my question.
    You are wright the index file is 308 KB.
    And offcourse that I delete my files and documents is not an Iweb problem, but because my English is not that good, that I thougt I try to tell the whole story, and hope people can read trough the lines.
    Why I didn't use Iweb to upload to the server is because the server company recommanded to use file zilla. And I am a nobody with this kind of things, so I did exactly what they tell me to do.
    No, i did not make a backup of Iweb and the domain file, but reading other messages on this forum showed me that I can maybe try to make empty the cashfile (?)
    and otherwise I have bad luck and have to make my website again. Offcourse I have a lot of examples from all the pages (copied from the local map to my USB stick) and my website is aprox. 15 Mb, (not so big) so it will cost me a few nigths.
    But I'm still hoping on a miracle :-)
    greetings Lasource

  • Closed Captioning Window slow to open

    We have a team member using CP7 on a Win7 machine having a delay when he opens the closed captioning window.  It can take up to 10 seconds for the window to open. 
    We just put him on someone elses machine and it didn't do that even when logged in with his credentials.  He says it has done that through all the versions of Captivate that he's used on the XP and Win7 platforms and on previous computers.
    Does anyone have an idea of what might be causing this?
    Thank you,
    Susan

    Here's the fix to which I was referring, supplied by a colleague on Linked-In:
    "There are 2 instances of a codec that need to be turned into a .bak file.
    First you go into C/program files/Adobe Media Encoder CS5/MediaIO/codecs to find a file "SurCodeWrapper.vca" Change it to "SurCodeWrapper.vca.bak" do the same thing in C/program files/AdobePremiereProCS5/MediaIO/codecs with the "SurCodeWrapper.vca file there too. This WILL fix the lag. I think you lose surround sound encoding by doing this, but this hasn't been a problem for me."

  • When I only want to close the current window to return to the previous window, the whole firefox site closes down, I end up back at my desktop & have to start all over again. How can this be fixed?

    If I close a window I should be back at the previous window that I was at when I followed a link to this window. At least that's the way Internet Explorer works, which I have used for years. The only thing that prevents me from using Firefox exclusively is that it is very time consuming to have to start all over again from scratch every time I close a window. For instance, say I type "cats" into the search box. It gives me links to a list of "cats" sites. I go to a "cats" website, decide I don't like it so close the window to return to my list of sites, but instead of returning me to the list, I end up at my desktop. Then I have to start all over, just like I had not even been online. Very aggravating. I don't know how else to describe the problem, I can't believe that other people haven't had a similar complaint, unless I just have some settings wrong?

    Now up to Firefox 8 and the problem persists. Cannot go to the www.turnitin.com page and login as I used to do -- Firefox does not remember my username or password.
    Still works on Windows, and with other browsers... It would be great if a fix is available.

  • When closing Firefox windows, I would like a warning before the last window closes. The about:config settings do nothing. There is a warning for multiple tabs..

    When closing Firefox windows, I would like a warning before the last window closes. The about:config settings do nothing. There is a warning for multiple tabs... why not for the last window? I do not use tabs... just windows... I have a mouse button programmed for that. It is really irritating to have to restart Firefox all the time and then open the history window because no warning was issued!

    This is ridiculous. I've had this problems for years now and I'm finally walking away from Firefox. I use my keyboards more than my mouse, and how many times does your finger slip and hit Command Q instead of W. How come FF can't reset something as trivial as this? So many people are having problems with this?
    Feels like FF has become too big, too slow and just not cooperative anymore. What a shame, I've been using Netscape/Firefox for 13 years. This is silly.

  • 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 do I move a group of tabs before closing a window?

    I recently lost all my custom settings on Firefox after an aggressive tech support person "cleaned" my browser settings. When this happened, I lost the ability to move my open tabs to a new group before closing the window they were in.
    Previously, when I had multiple windows open, and I initiated an "Exit" or "Close" command on one of the open windows, 2 things happened:
    (1) First I received a warning message asking me if I wanted to close the window
    (2) Then I received a second warning message asking me if I wanted to move my tabs before closing the window.
    Now, I only receive the 1st message, and I am no longer offered the option of moving my tabs to a new window before closing the current window.
    I've tested this both with and without the Tabs Group Manager which I was using prior to the time my browser was "cleaned", and I still have not found a way to restore this missing feature.
    Unfortunately, I don't know if this feature/option is:
    -- provided as a default in Firefox
    -- a customizable feature in Firefox, or
    -- a feature in a Firefox add-on.
    Can anyone tell me where/how to restore this option to move a group of tabs before closing a window?
    Thanks,
    Metta

    Thank you, guigs2, for your feedback, and my apologies for the confusion. After rereading my question, I realize I made a couple of typos in my original help request which cannot now be corrected. Specifically, the 2nd sentence in the first paragraph should have read:
    "I lost the ability to move GROUPS of open tabs to a new WINDOW before closing the window they were in."
    This means that, as far as I can tell, neither of your plugin recommendations applies:
    -- Apparently, Tab Mix Plus only applies to manipulating tabs WITHIN the existing window and, unless I am missing something, I did not see any reference to the option I'm looking for -- specifically, an automatic prompt offering to move groups of tabs to a new window before closing the existing window.
    -- Unfortunately, the other plugin you mentioned (Tag Cloud) appears to be non-functional in the current version of Firefox, based on the most recent user reviews.
    In light of this, I will consider the possibility of resubmitting my question with the typos corrected -- and, in the meantime, if there is any additional feedback that you (or anyone else) can offer, I would be most grateful!

  • Installing old software from previous Windows 8 installation? And installing new software.

    Hello.
    Two questions.
    Can I re-install software from my previous Windows 8 installation onto Windows 10 Preview? All the files needed are in Windows.old. I have some software that was registered to me, and getting another copy will be kinda hard.
    Also, when the final edition (i.e: not a technical preview) comes out, will any new software that I have installed onto the Technical Preview still be there?
    Thanks.

    It depends on how you installing Windows 10, if you do custom install or clean install which means either format partition of your current Windows or install Windows and removing previous version of Windows which would create Windows.old, you have to reinstall
    your applications and restore your data and you need product keys and installation files. However , if you do upgrade which is possible from Windows 8 to Windows 10, then you will have your programs and files in place and you don't need to reinstall them.
    But note like previous upgrades (e.g. Windows 7 to Windows 8), you might have some compatibility problems and you might need to uninstall some programs and install newer version which you will know during upgrade process.
    When final version of Windows been released, you might need to update or install latest version of some software or programs which are compatible with Windows 10 and latest software products should work on Windows 10.

  • I can't find firefox.exe on my hard drive after a reboot; is there a way to restore previous windows and tabs after I reinstall?

    I closed firefox and rebooted. After rebooting, I tried to load Firefox but the firefox.exe file was nowhere on the hard disk.
    I would like to restore my previous windows and tabs. How do I do this?

    It is one or the other. Since you're Restored the phone from the previous backup, the new content is gone (unless you did a separate backup) and whatever was in the old backup is all you've got. And there is no merging capabilities.
    Beware that if you do not password-protect a locally-stored backup made on iTunes on a computer, not all the content gets saved. I suspect it is similar when using iCloud, but I never use that so don't know for sure. Just Restored my new iPhone 6+ from the full backup of the previous iPhone 5 and all was there save a few passwords such as iCloud.

  • Can't get Cover Flow to keep previous window settings, help?

    I'm sure that there is some easy quick fix to this but I couldn't find it anywhere doing various web searches. Anyway, I'm new to Snow Leopard and I've noticed a very irritating difference/glitch/whatever between it and Leopard.
    I am a graphics guy and I always used Cover Flow in Finder to search through my documents and files and heap of images. The old Cover Flow view always opened new windows to the size and proportions (image vs. text) as my previous window(s). In this new Snow Leopard that I installed, whenever I open a new Finder window in Cover Flow it gives me this huge 90% image view with just this small 10% file texts at the bottom of the window. Each time I have to click and drag the divider bar back up to the 50% line. If I click on a file, again, the view jumps to this flippin' huge image view and I have to drag the divider back up to the middle.
    Is there anyway to get Finder to be like in the old Leopard where it remembers that I want Cover Flow to always be a 50/50 split between seeing the images and the file names? Its driving me crazy. I would assume there is just some little button or something that I am missing. Thanks.

    I gave that a try and it "kinda" works but doesn't really solve the annoyance. If you resize it again in the slightest or shift the divider bar, the whole thing jumps back to the 90/10 view. Why!?!?! Does that not drive anyone else insane?
    Thanks for the duct tape fix though Captfred. I can at least use that in the mean time. I really hope they fix that problem with the next update. It worked just fine before, but now it makes cover flow somewhat unusable.

  • Closed Project Window Stays Open

    I have one project out of three where this is a problem.  I can end the project but the window does not close.
    I am using Captivate 4 and I have gone to preferences and changed end of project to be Close Project. Even at that, the last slide wants to keep going. I want it to freeze so it can be read. I put a button on it to stop the slide and then had to put a dummy slide at the back to close the project once the viewer hits the Close button.
    On the other projects, I can just let the slide fade out. Why does the window stay open? Is there a solution? I could not find this listed in the forum but was sure this was an issue in versions 2 and 3 as well.
    Thanks.
    Jeffrey Riley

    Do you mean like this?
    Indeed, that is the new behaviour. You have to make a selection, before closing the window.
    The new GarageBand does not quit, when closing the main application window. This way you faster switch between projects. You do not have to quit and relaunch.
    If you want GarageBand to quit, use the quit command ⌘Q instead of closing the main window.
    -- Léonie

  • Trigger Javascript when closing browser window from CP8

    I worry this isn't possible but here goes....any help would be incredible.
    Recently I was given some great advice on how to trigger a Javascript action in the frame on our LMS which the Captivate file plays in.
    It works perfectly and on the final page triggers the Javascript which send usage back to the LMS and forward the user to a page which allows them to rate the course.
    The code was as follows:
    top.code.closeSCOContent();
    closeSCOContent() is something written into our LMS.
    However the obvious issue occurs when a user just closes the browser window and for some reason our LMS doesn't record any bookmarking or any data.
    The only way it seems to do this is if that function is called.
    So using the window.onunload() or the DOFinish; function is there a way I can edit any file in the Captivate output to trigger this function when closing the browser?
    Long shot I know but currently the best I have managed is getting the course to trigger this as soon as it loads rather than closing the window?
    Massive thanks in advance for any advice.

    Any solution to ensure the data is written back to the LMS would solve the issue.
    Currently when the close button is pressed nothing happens at all and it's a big problem.
    Triggering this .closeSCOContent() function would be the ideal, but if it's not possible anything to write back would be best.
    When you say <body onbeforeunload="top.code.closeSCOContent();">
    Do you mean putting this in the HTML file of the output which currently is:
    <body bgcolor="#f2f2f2">
    and change this to:
    <body onbeforeunload="top.code.closeSCOContent();" body bgcolor="#f2f2f2">

Maybe you are looking for

  • Clicking on the View More in Outlook....hyperlink does nothing!!

    Does this work for anyone using Lync 2013 FE, Lync 2013 client on Windows 7. Exchange version is 2010 SP3. Everything in the client works just fine but when I click on the Conversations tab, I see conversations going back about 6 months. I have conve

  • Itunes not seeing Ipod and songs not playing Ipod

    I have a couple of issues just wanted to know if anyone has run into. I have a couple of computer one running Vista, the other XP, neither see the ipod in itunes, both see it in Windows. That is the first problem. I have also tried all of the suggest

  • How do i copy phootshop from old hdd to new ssd

    how do i copy phootshop from old hdd to new ssd?

  • Problem with Customer exit

    Hi, I have a set of variables: ZVAR_002 : Fiscal year period (User entry/mandatory/single value), Ready for input. ZVAR_004 : Key date to derive Document Date (customer exit/mandatory/single value) used date as reference characteristic, Ready for inp

  • Isg_database_down

    I have database as GENIUS and its running in noarchive mode.. SQL> startup mount ORACLE instance started. Total System Global Area 236000356 bytes Fixed Size 451684 bytes Variable Size 201326592 bytes Database Buffers 33554432 bytes Redo Buffers 6676