Close a Frame when another one opened

How do i Close a frame (dependent Frame) when another frame opened
dispose() method did nothing and so do system.exit(0); as the System.exit(0) close the whole app that meant also the frame i would like to open when the other frame closed and moved from " Memory " huge topic for me
dispose(); didn't do what i really needed to happened
please any suggestions ASAP ? i need that in swing app

i used dispose() but didn't work with me as i noticed the memory usage with this java app when i run the app after closing the frame . the memory usage didn't change that meant as least the frame didn't closed or cleared from the memory ?!
        try {
                Socket ss = new Socket("14.23.5.122", 1235);
              //  JOptionPane.showMessageDialog(null, "Server's OK", "Connection", JOptionPane.INFORMATION_MESSAGE);
                new LoginFrame().setVisible(true);
              //  this.dispose();
                this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            } catch (UnknownHostException eh) {
                System.out.println("Unknow Host Exception"+ eh.getMessage());
            } catch (IOException eo) {
                System.exit(0);
               System.out.println("IO Exception"+ eo.getMessage());
         /*finally{
        System.exit(0);
        }*/

Similar Messages

  • When I click the icon to open Firefox it opens the program 2x. When I close it there is another one open behind it that I have to close. How do I fix this?

    see question...

    This thread has some solutions:
    https://support.mozilla.org/en-US/questions/762043
    The most straightforward seems to be: hold Ctrl and Left-Click on the Reload button. You could also Middle-click on the Reload button (e.g. "click" with the mouse wheel, if you have a wheel-mouse.) The thread above also has some other options.
    Edit: you could also hold Ctrl and drag a tab next to itself to clone it, another suggestion from the above thread.

  • I usually have 3-4 tabs open which I am saving to read later. But I loose them all the time when firefox crashes or when another appliaction opens firefox to download. Is there a way to save my tabs ?

    I usually have 3-4 tabs open which I am saving to read later. But I loose them all the time when firefox crashes or when another appliaction opens firefox to download something and it will discard all my tabs. This is incredibly annoying, is there a way to save my tabs ? or get them back when there is no "restore session" button ?

    In Firefox Options / Privacy be sure "Remember download history" is checked. To see all of the options on that panel, "Firefox will" must be set to "Use custom settings for history".
    To find your OS information, on your Windows desktop, right-click the My Computer icon, choose Properties, under System on that small window is info about your OS.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • Getting a movie clip to stop playing, when another one is activated.

    Hello,
    I have a file with 3 movie clips and three buttons that control them to play...with the script below It is working fine.
    stop()
    function startImageOne(Event:MouseEvent):void
        imageOne_mc.play();
    function startImageTwo(Event:MouseEvent):void
        imageTwo_mc.play();
    function startImageThree(Event:MouseEvent):void
        imgThree_mc.play();
    start1_btn.addEventListener(MouseEvent.CLICK, startImageOne);
    start2_btn.addEventListener(MouseEvent.CLICK, startImageTwo);
    start3_btn.addEventListener(MouseEvent.CLICK, startImageThree);
    Then, I wanted to stop a movieClip, if another one was selected to play..so I inserted stop options to the function, which I thought would work, but doesn't. Does any one know why...See this code below..
    thanks
    stop();
    function startImageOne(Event:MouseEvent):void
        imageOne_mc.play();
        imageTwo_mc.stop();
        imgThree_mc.stop();
    function startImageTwo(Event:MouseEvent):void
        imageTwo_mc.play();
        imageOne_mc.stop();
        imgThree_mc.stop();
    function startImageThree(Event:MouseEvent):void
        imgThree_mc.play();
        imageOne_mc.stop();
        imageTwo_mc.stop();
    start1_btn.addEventListener(MouseEvent.CLICK, startImageOne);
    start2_btn.addEventListener(MouseEvent.CLICK, startImageTwo);
    start3_btn.addEventListener(MouseEvent.CLICK, startImageThree);
    thanks
    Babs

    Hi Ned,
    I checked the names and they are all correct...(I named one of the instances img instead of image, but it is all fine.
    The movie clips are simple...They have a stop action in the first frame, and then it is just an image that fads in and fades out..
    Pretty simple?
    The code looks fine, so I can't figure out, why the movie clip that is currently playing doesn't stop, when another button is activated.
    It seems like is should work??
    I'll keep playing .. thanks!!
    babs

  • Can't select items on desktop via finder window when another application opens that finder window

    When another program (like premier pro, or gmail with chrome) opens a finder window (in order to import files, or make attachments), I am unable to select items on my desktop.
    My workaround is to open an independent finder window, add a tag to the file or folder i want to use, then go back to the 'import' window in premier pro, or the attachment window in gmail in chrome, and select the relevant tag in the lefthand column, then select the file or folder in the righthand column. This seems slow and frustrating and unnecessary.
    Is there a really obvious thing I'm missing? Please be merciful, Apple Support Community...

    Hi Sue, if you can navigate in Finder do this:
    navigate to yourhome/library/preferences and trash these two files:
    com.apple.finder.plist
    com.apple.sidebarlists.plist (if this exists in 10.2 - not sure)
    (You will have to reset a few finder prefs the way you like them.)
    Then log out and back in again. Or restart.
    Good luck, let us know.

  • Making one Pop-up close when another is opened.

    I'm working on an application that shows enlarged bits of
    text when their smaller counterparts are clicked. The problem I'm
    currently having is that I need to make all of the other open
    pop-ups close when a new one is opened. I considered adding an
    invisible box the size of the stage to each movie clip, but that
    would be unbelievably messy, so I'm trying to avoid that solution.
    The app in it's current state is here:
    http://indigotest.com/flash.html
    Please let me know if you have any ideas for a
    solution.

    So are you saying that the text and pop up are in the same
    movieclip?
    If so, then that loop function would change to...
    function resetMCs(){
    for(i=0; i<mcArray.length; i++){
    this[mcArray[ i ]].gotoAndStop(1);
    (Note: that [ i ] shown has extra spaces inside it so that it
    isn't read as an italics tag for this forum... remove them if you
    copy the code)
    and you would put that function in the timeline where all the
    text mc's live, but on a separate actions layer if you don't have
    one already (good housekeeping).
    The code for your frame 1 button in each text mc would be..
    on(release){
    _parent.resetMCs();
    play();
    (Note (again): there may or may not be a timing issue in the
    on(release) code since it takes time to move to a frame. So if
    things aren't displaying properly, that can be dealt with as well.)
    You can still use either looping method I mentioned before...
    array (as shown here) or the numbered-names approach shown
    earlier.

  • All open windows close when another one is opened

    Running OSX10.6.7
    Recently the window behavior has changed, now when a different active app is selected, all the windows from other active apps become hidden
    if one holds the Option key when selecting a new app or a hidden window in an open one, the new window opens and the old ones remain on screen but not active
    this behavior is new, perhaps coincident with the latest snow leopard update
    I suppose that I may have triggered this change by some accidental combination of key strokes 
    I prefer that the act of opening a new window not affect the other open windows
    is this behavior controlled by a preference pane somewhere, or some combination of key strokes or by one of those programs such as Macpilot or Tinkertool, although I do not recollect deliberately changing anything

    It's a hidden Dock preference. You can change it in TinkerTool, or launch the Terminal application, copy or drag -- don't type -- the following text into the window, and press Return:
    defaults write com.apple.dock single-app NO
    You may have to relaunch the Dock or log out for it to take effect, I'm not sure.

  • I can't stop this webpage opening, when i try to close it another one opens: **tp://rfhtjs.danyellelittle.n*t/tribunal-of-law/mXt6u4hd3kVbnIYqWG3df0GSpuiNj83FnJ

    I have put * for the initial ht and the e in .net, hopefully so that people don't click on it and get the same problem. I've removed Firefox from my computer (though all my bookmarks etc are there when i reload it again), but the problem continues.

    Many thanks, that has solved the problem
    Kind regards.

  • Closing one program when another is opened

    I'm tyring to open a program using a jButton, and closing the program from which it was opened. I can open the program using the piece of code below, but the program from which it was opened stays open, leading to too many windows opened at the same time. Here is the code:
    private void jBManualActionPerformed(java.awt.event.ActionEvent evt) {
    new ManualMode().setVisible(true);
    This opens ManualMode() but it also leaves open the window for something called MainMenu. How can I make the window for MainMenu go away?

    robertplant22 wrote:
    I'm tyring to open a program using a jButton, and closing the program from which it was opened. I can open the program using the piece of code below, but the program from which it was opened stays open, leading to too many windows opened at the same time. Here is the code:
    private void jBManualActionPerformed(java.awt.event.ActionEvent evt) {
    new ManualMode().setVisible(true);
    This opens ManualMode() but it also leaves open the window for something called MainMenu. How can I make the window for MainMenu go away?See the dispose() method.

  • I have firefox 5 on windows 7 ultimate, evry time i close the browser , when it is opened again i get the last page i was browsing, but Options, general, when firefox starts is set to show my homepage, whats wrong?

    homepage is set to www.google.co.uk, this works when i click the home page icon, but not when i open the browser, its always the last site i visited , which i dont want

    Perhaps your install of Firefox is hanging on exit, triggering the session restore.
    You can disable session restore by changing a hidden preference.
    Type about:config into the location bar and press enter
    Accept the warning message that appears, you will be taken to a list of preferences
    In the filter box type resume to bring up a small number of preferences
    Double-click on the preference browser.sessionstore.resume_from_crash to change its value to false
    *solution courtesy TonyE
    https://support.mozilla.com/en-US/questions/754840

  • Disable an InputText when another one is modified

    Hi all,
    I have 2 h:inputText and I'd like to do this :
    when the user types some text in the first one, the second one becomes disabled and vice-versa. And when the user delete the text of the first one, the second one becomes enabled and vice-versa...
    I hope I make myself clear... :/
    Any idea ?

    <script>
      text1 = getElementById("myForm:text1");
      text2 = getElementById("myForm:text2");
      function check() {
        if (text1.value.length<0) {
          text2.disabled = true;
        else {
          text2.disabled = false;
    </script>
    <h:form id="myForm">
      <h:inputText id="text1" onChange="check()" ....>
      <h:inputText id="text2">
    </h:form>not testet 100% but the solution is something like that

  • I create a document in pages and then export it as doc or docx file. I then email or place the file in a drop box. When another computer opens the doc or docx the photos in the document are randomly scattered. What is the solution?

    I create a document in pages with photos. I then save it and I also export it as a doc or docx file. I then email or place in a drop box the doc or docx file. The other computer opens the file in Microsoft word and the text remains in place but the photos are randomly scattered throughout the document. What is going wrong? How do I correct this problem? I really don't want to go back to a Microsoft machine.

    That assumes two things:
    1. That Apple would have let Microsoft have access to its file format.
    2. That Microsoft would want to spend the time and trouble to write filters for file formats that Apple can't be bothered doing for its own software.
    Peter

  • 'not responding' when another app opens

    iDVD 7.1.2
    OS 10.9.4
    iDVD runs fine until another app is launched. Then it's 'not responding' and I've given it up to a half hour to recover.
    Activity monitor says it's regularly over 100%.
    MacBook (Fall 2010).
    Tossed cache.db and plist.
    Other ideas please?

    Try this basic troubleshooting fix:
    1 - delete the IDVD preference file, com.apple.iDVD.plist, that resides in your
    User/Home/Library/ Preferences folder.
    2 - delete IDVD'S cache file, Cache.db, that is located in your
    User/Home/Library/Caches/com.apple.iDVD folder.
    3 - launch IDVD and try again.
    NOTE: In Lion, Mountain Lion and Mavericks the Home/Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and press the Return key - 10.7: Un-hide the User Library folder.
    If you're running Mavericks, 10.9,  go to your Home folder and use the View ➙ Show View Options menu to bring the this window:
    It the above doesn't help Boot into Safe Mode, Mac OS X: Starting up in Safe Mode, and try iDVD there.  Then reboot normally and try again.

  • I receive a "close firefox" message when trying to open the browser. I have reviewed task manager and no firefox applications are open. I have even uninstalled Firefox and, after reinstall, the same message appears (I did retain preferences).

    Program was working fine. I attempted to open a webinar link from a known source. There is now no way to re-open Firefox or access any on my programs. After the uninstall, I did retain preferences. If I have to erase everything, I really do not see any value in continueing to use the program

    There are various causes for this error, see [[Firefox is already running but is not responding]] for details.

  • When using FireFox I run into Microsoft Visual C++ RUNTIME ERROR an closes down firefox when it is opened like maybe 3 minutes. This is anoying, how can this be fixed I have restored my pc several times.

    Is there a solution to fixing the unexpected Microsoft Visual C++ RUNTIME ERROR'S I am getting

    These are Screen Shots of what is happening.

Maybe you are looking for

  • Contacts Despair

    I have a Nokia 5300 XpressMusic, and have bought a 5800 XpressMusic today. The problem with my 5300 was that the top keyboard had stopped working. Before it stopped working completely, though, I was able to export my contacts, just in case. I saved t

  • Error when validating an Application in Hyperion Planning

    To all, While validating an Application, we are recieving an error message. This is an existing application that has been in service for some time. We are having the same werro message on a new application, so it is a system issue, versus an applicat

  • Change AppleID

    I changed my apple ID recently.  However, when I try to access iTunes store from 'settings', it shows my old apple ID and will not let me access it.  I need to update my iTunes on the iPhone but can't because it's still trying to use my old cancelled

  • Get 2 screen in monitor,1 in top, 1 in bottom

    ckick on video,like youtube or any video clip ,will get 2 screen in monitor,1 in top, 1 in bottom

  • OMS job failed - node preferred credentials not correct

    I m facing problem while submitting job to OMS, it gives me error the node preferred credential are not set correctly, i per the documentation i created a system user ntoem gives it admin rights and logon as a batch job privilage but i m still gettin