Howto close only one JFrame, and not the whole Application?

I hava a Application (Just a JFrame).
I open a new JFrame doing some Wizard stuff.
The user should close the Wizard with the Window-Closer [x].
But: all open Frames dispose. How can i prevent that?
The Application uses:
         setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowClosing(java.awt.event.WindowEvent evt) {
        System.gc();
        System.exit(0);
        //or alternative: dispose();
});The second JFrame uses:
frame.addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowClosing(java.awt.event.WindowEvent evt) {
        frame.dispose();
});

System.exit(0) will close all windows in an application if you use it, as it will kill the whole program you have launched from the command-line, you need to call frame.dispose()

Similar Messages

  • Mail: how to download ONLY last emails and not the whole hotmail.

    Hi!
    Quick question: like what Mail does in iPhones/iPads, how can I configure Mail in my iMac or Macbook Pro so that it only downloads the last, say 50 emails and not the 4000 aprox. emails I have inside the hotmail (now outlook) server?
    I have been wanting to use mail for a long time but I can't seem to find that option. I only want to see the LAST EMAILS like what happens in the app on my iPhone.
    Thanks.

    unless there is a special setting in yahoo webmail interface that allows this (gmail pop has it for example), there is no way to do it. POP will download all available messages on the first download. that's how POP works. from there on it will only download new ones.

  • How can I sync only checked items and not the whole album?

      I only want say three songs out of an album but it syncs the whole thing.  How do I change that?

    Don't create a playlist for three songs.
    Either uncheck those songs or a much better way is to create a playlist (or a few) of songs you want on the iPod the sync only those playlists.
    To add/delete from the iPod, simply add/delete from those playlists.

  • How can I change one section of the document to a landscape orientation and not the whole document?

    How can I change one section of the document to a landscape orientation and not the whole document?

    Page Setup, including page orientation, is done in the File menu. The setting applies to the whole document. As Peter says, you can rotate the contents of a page (not including the text layer of a word processing document).
    As an alternative, you could use Numbers, where Sheets are empty canvases onto which you may place images, charts, tables and text boxes, and where page orientation may be set for individual Sheets. The main tradeoff is that you lose many of the built-in word processing and page layout features of Pages.
    Regards,
    Barry

  • When printing from aperture my margins are unequal, even if i set my margins they come out bigger one side  and not the other. i am using a macbook pro running osx lion and printing with a canon pro 9000

    when printing from aperture my margins are unequal, even if i set my margins they come out bigger one side  and not the other. i am using a macbook pro running osx lion and printing with a canon pro 9000.
    please can anbody help or advise?

    You didn't mention any color calibration being done on your monitor.  This is an essential part of any color-correct workflow.  What are you using to calibrate your monitor (and your printer)?
    Print profiles (for soft-proofing as well as printing) are for specific combinations of paper & printer.  The nine you have are each, most likely, for a common paper (perhaps mfr'd by Canon) to be used with your printer.
    I don't know what you mean when you say "I choose a high standard print option".
    Have you read the User Manual chapter on printing?
    Printing Your Images
    There is also a good appendix on calibration:
    Calibrating Your Aperture System

  • Since I upgraded to IOS7 when I synch my photos on my iphone and ipad they all come across in one album and not the separate albums I have them in on my laptop. Has this happened to anybody else??

    Since I upgraded to IOS7 when I synch my photos on my iphone and ipad they all come across in one album and not the separate albums I have them in on my laptop. Has this happened to anybody else??

    Settings>Store>Apple ID, tap the ID shown, sign out, sign back in using your ID.

  • Ipad screen went white with gray/black line through it. Worked one minute and not the next. It has not been jailbroken.

    The ipad screen has went white and has a gray line running through the middle of it. It worked one minute and not the next. It has not been jail broken.

    Have you tried restarting or resetting your iPad?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after It shuts down, press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10-15 seconds). No data will be lost.

  • Podcast Works on a web browser one minute and not the next.

    We are having an issue with a Podcast working on Safari/Firefox one minute and not the next. Our teachers add Podcast to their web pages and then post it on our web server. Teachers, using Safari and Firefox, maybe able to open their podcast one day and then not the next. Has anyone had this problem? We have the most up-to-date Quicktime. Any information would be helpful.
    We are running 10.4.9 on a Macbook.
    Thank you,
    Jennifer

    Have you tried restarting or resetting your iPad?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after It shuts down, press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10-15 seconds). No data will be lost.

  • How do you extend the frame from one side but not the whole thing?

    I am updating my blog and want to put a rectangle picture into the pre-set frame. I need to stretch it horizontally but the entire frame (i.e., both sides and top/bottom) stretched instead. How do you extend the frame from one side but not the whole thing?

    In Inspector, select the Graphic Inspector. Choose, from the Fill options, Image Fill. Select the image from the dropdown and click Open. Now go back to Inspector and click on Scale to Fit. Choose from the options in the window. There are a number of them which should address your problem:
    With the Blog template, you will probably need to insert a text box over the stock placement frame and work with that instead.
    Mark

  • How do you move a single album, and not the whole library, in iPhoto to an external hard drive?

    How do you move a single album, and not the whole library, in iPhoto to an external hard drive?

    File -> Export to a folder and copy it over.
    That will give you a folder with the images. There is no way to move an album outside of iPhoto. You would need to have a library containing it.
    Regards
    TD

  • I download radio programmes via Podcast, but have recently found that some episodes play for only 30 seconds and then the whole app quits. This happens even though the whole episode has downloaded. I would be grateful for advice.

    I  download radio programmes via Podcast, but have recently found that some episodes play for only 30 seconds and then the whole app quits. This happens even though the whole episode has downloaded. I would be grateful for advice.

    Try:
    - Reset the iOS device. Nothing will be lost      
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Delete the problem episodes  and redownload.
    - Reset all settings                            
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes
    - Restore to factory settings/new iOS device.                       

  • Adding music to more than one slide and not the entire presentation

    I love the way Keynote looks and behaves, but it fails to compete with PPT on certain aspects, such as adding the same audio track to more than one slide and NOT have it play for the entire presentation. Using PPT (and I hate PCs!) you can have a track play for "n" number of slides. I'm frustrated that I cannot do this with Keynote! I don't want the track as a soundtrack for the entire presentation. I want to add another audio track to, say, the last two or three slides only and something else for all the other slides. I looked through the user manual, forums, etc. and found that I can only add a soundtrack to the entire thing or a different audio to only one slide.
    Question: What if I cut (that last two slides) and paste the the slides as a new Presentation with its own soundtrack, then reincorporate that back and paste it into the original presentation? Will that work or will the original soundtrack take over the entire presentation again?

    Anyone remember Claris Works for Mac back in the early 90s? Now, that was a gem! What were they thinking when they got rid of that one (and replaced it with AppleWorks!)?
    Good point, but one which Apple has heard a zillion times, and so sadly chosen to ignore. The really heartbroken among us remember AppleWorks from the mid-'80's, the world's first integrated suite, then ClarisWorks, then AppleWorks; and, of course, Beagle Bros. and BeagleWorks. But since we old f*s are dying off, those complaints will eventually stop. +Sic transit gloria mundi.+

  • How to delete one perticular message from a user and not the whole messages

    hi
    i would like to know how can i delete a single message sent by a person and not the complete list of message received by me from the same person also how can i forward a message received by me

    beesani
    Sorry. ;( You can"t delete part of a message. You can only delete the entire message from that person.
    will2b

  • Master Enable User to enable only OIM account and not the resoruce accounts

    Hi Experts -
    I have a requirement wherein when the user is rehired, only the OIM profile has to be enabled and not the resource accounts on the user profile.
    How can we acheive this?
    Thanks
    Kunal Jain

    How do you know if the person is rehired? You can create disable task on the process and have your adapter there to check if it's a rehire. If infact this is a rehire then donot enable the user else call the actual conditional enable task.
    -Bikash

  • How do you select n rows and not the whole table

    Hi
    I would like to only select the first 50 rows from a table and not the entire table. how do i accomplish this
    Thanks

    Sayeed's example will work great if you don't care which 50 rows you get back. If you do, you can use an inline view to sort them first and get back a ranked result set:
    select *
      from (select whatever
            from table
           order by key desc
    where rownum <= 50

Maybe you are looking for

  • Export data from an iView to Excel, get a login screen displayed in Excel

    Hi I'm trying to export data from a tableview to excel, I followed the instruction posted by Detlev Beutner, created a class extends AbstractPortalComponent, and overwrote the doOnNodeReady: HttpServletResponse response = request.getServletResponse(t

  • Using a wired AND wireless network on one machine for better security

    It occurs to me that if I could separate my Internet traffic from my LAN traffic, I could have the best security setup, so that machines on my network would only have file sharing enabled for the WIRED connection and I would use the Internet over the

  • Problem with Sound Visualization

    Hello I'm trying to add sound visualization to my flash mp3 player. I found some samples but when adding the script to my project it doesn't work. The code for my mp3 player is: import caurina.transitions.*; volume_mc.slider_mc.buttonMode = true; var

  • Password protect a Numbers file

    Hello friends, I was wondering how to password protect a numbers file. I'm creating a financial report and only some eyes can see it. Anyway to force a user to enter a password before it opens is the goal. I appreciate your assistance. Gary

  • Encore CS4 problem uploading flash streams to remote ftp in build

    Hi I'm working on a windows XP and trying to upload to my my remote server which has a new install of the Adobe Flash Streaming Media Server 3.5 as for Encore under build when creating a streaming flash I can't log into my ftp site, only to local fol