What do I need to do to make a button make a window disappear?

public class MyWindow extends JFrame implements ActionListener
     JButton button;
     public MyWindow()
          button = new JButton("Close this window/JFrame");
          button.setVisible(true);
button.addActionListener(this);
getContentPane().add(button);
public void actionPerformed(ActionEvent evt)
//Code that runs when the button is pushed
// what do I need to call to close this window?
     public static void main (String[] ar)
MyWindow m = new MyWindow();
m.setSize(new Dimension(300, 100));
          m.setVisible(true);
I'm tired and have been coding for at least 4 hours, please help a guy out.

While many people seem to find it somehow glorious to code until very late, it would be more productive if they'd take a rest and continue later, as you've just shown.

Similar Messages

  • I just got my Mac back from Apple repair and I can't burn a disc. What do I need to do to make that happen?

    I just got my Mac back from Apple repair and I can't burn a disc. What do I need to do to make that happen?

    Hello deneye2112,
    Thank you for providing the details of the burning issue you are experiencing.  I found some resources that I think might help:
    First, I recommend resetting the System Management Controller (SMC) on your Mac (I wasn't sure if you had a removable battery or a built in battery, so I listed the steps for both):
    Resetting the SMC on Mac portables with a battery you can remove
    Note: Learn about removing the battery on MacBook and MacBook Pro.
    Shut down the computer.
    Disconnect the MagSafe power adapter from the computer, if it's connected.
    Remove the battery.
    Press and hold the power button for 5 seconds.
    Release the power button.
    Reconnect the battery and MagSafe power adapter.
    Press the power button to turn on the computer.
    Resetting the SMC on portables with a battery you should not remove on your ownNote: Portable computers that have a battery you should not remove on your own include MacBook Pro (Early 2009) and later, all models of MacBook Air, and MacBook (Late 2009).
    Shut down the computer.
    Plug in the MagSafe power adapter to a power source, connecting it to the Mac if its not already connected.
    On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
    Release all the keys and the power button at the same time.
    Press the power button to turn on the computer.
    Note: The LED on the MagSafe power adapter may change states or temporarily turn off when you reset the SMC.
    You can find the full article here:
    Intel-based Macs: Resetting the System Management Controller (SMC)
    http://support.apple.com/kb/HT3964
    If you are still having trouble with burning after that step, I recommend reviewing the section titled "Top troubleshooting tips" in the following article:
    Disc Burning Quick Assist
    http://support.apple.com/kb/HT1152
    Thank you for posting in the Apple Support Communities.
    Best,
    Sheila M.

  • Recently purchased a used IPad 2 but it still has previous owner's data.  I've been told not to sync it to my computer as it will cause problems.  What do I need to do to make it compatible with accounts on my mac and ipod touch?

    Recently purchased a used IPad 2 but it still has previous owner's data.  I've been told not to sync it to my computer as it will cause problems.  What do I need to do to make it compatible with accounts on my mac and ipod touch?  Thanks for any and all help!

    You can wipe the iPad's contents completely by going to Settings>General>Reset>Erase All Content and Settings. This will remove all of the previous user's apps, data, settings and so on from the iPad and you can set it up as your own.

  • HT3775 what do i need to do to make movies play with .avi?

    what do i need to do to make movies play with .avi?  The document “Image02.avi” could not be opened. A required codec isn't available.  when I click on the help button it brings me to this support page but I don't see on here what I'm suppose to do...

    VLC will open just about any video format:
    http://www.videolan.org/vlc/download-macosx.html

  • I have new printer Photosmart C410 and osx10.4.11. What do I need to do to make them work together?

    I have new hp printer Photosmart C410a and Mac osx10.4.11. What do I need to do to make them work together?
    My computer is:
      Model Name:    iMac
      Model Identifier:    iMac6,1
      Processor Name:    Intel Core 2 Duo

    Here is what you need to order:
    http://store.apple.com/us/product/MC573Z/A?fnode=MTY1NDAzOA
    Hope you are backing up anyway, but be sure you have an up to date backup. Repair permissions in Disk Utility, then restart from the Snow Leopard disk you buy (in the above link) and do an upgrade (only changes the OS), not a clean install (which wipes all data). Others on here may chime in on their thoughts on how best to do this, but I've never had trouble over 20+ years doing it this way. If you aren't having crashes and strange problems now you should be fine. Please write back or start a new thread (you'll get more help than continuing in this thread which has printing problems in the header) that has something like "Need help upgrading from Tiger to Snow Leopard" that will attract more help.

  • I have a full Creative Cloud Subscription, but I only use Photoshop and Bridge. I want to change to a less expensive subscription but it is not clear what steps I need to do to make this happen. Do you have a simple step by step guide? Seems that there is

    I have a full Creative Cloud Subscription, but I only use Photoshop and Bridge. I want to change to a less expensive subscription but it is not clear what steps I need to do to make this happen. Do you have a simple step by step guide? Seems that there is lots of help to upgrade but not down grade.

    FIRST check with Adobe to find out if you may cancel what you have without a fee
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"
    Then cancel what you have
    -cancel http://helpx.adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html
    -or http://helpx.adobe.com/x-productkb/policy-pricing/cancel-membership-subscription.html
    -or by telephone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html
    And finally buy a new subscription
    Cloud Plans https://creative.adobe.com/plans
    -Special Photography Plan includes Photoshop & Lightroom & Bridge & Mobile Lightroom
    -Special Photography Plan includes 2Gig of Cloud storage (not the 20Gig of the full plan)

  • I just upgraded from Mountain Lion to Maverick (10.9.3) and Adobe CC is listed as incompatible with this OS.  What do I need to do to make it work again?

    I just upgraded from Mountain Lion to Maverick (10.9.3) and Adobe CC is listed as incompatible with this OS.  What do I need to do to make it work again?  Just a patch/update or do I need to uninstall and install?

    antoniobesteban wrote:
    I just upgraded from Mountain Lion to Maverick (10.9.3) and Adobe CC is listed as incompatible with this OS.
    Where are you seeing that information? Got a link?
    According to the Adobe website: Mac OS X Mavericks (10.9) compatibility FAQs | CC, CS6, Acrobat
    Plenty of people, including me, are currently running CC on Mavericks.

  • Hi, when I download Adobe Creative Cloud I open it and then a message appears saying "...Error Code 204", what I have did, or what do I need to do to make it install properly !?

    Hi, when I download Adobe Creative Cloud I open it and then a message appears saying "...Error Code 204", what I have did, or what do I need to do to make it install properly !?

    Walegena37827201 please see Error downloading and installing Creative Cloud application for information on how to resolve Error 204.  If you have any questions regarding the steps listed in the document you are welcome to update this discussion.

  • Can I copy and paste the oil paint filter from CC to CC 2014 in the corresponding folder? What else I need to do to make it works?

    Can I copy and paste the oil paint filter from CC to CC 2014 in the corresponding folder? What else I need to do to make it works?

    Sorry, but that's a no.  Google Photoshop CC 2014 FAQ to find out why

  • What do I need to do to make a forum just like this one(from apple)

    What do I need to do to make a forum just like this one(from apple)

    Wendy, as a_a has explained, when power is removed, the data is gone.
    If you want to put this problem to rest, remove either of the battery connections; this will assure the data is gone forever!
    WyreNut
    Post relates to: Centro (AT&T)
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • I updated SCCM 2012 R2 from CU3 to CU4. Where can I find good directions on what else I need to do to make this work?

    I updated SCCM 2012 R2 from CU3 to CU4. Where can I find good directions on what else I need to do to make this work? I'm assuming I have to deploy the new clients?
    Thanks,
    James
    James A+, Network+, MCP

    You have to create different collections (x64 vs x86 clients) because the .msp to be deployed is architecture specific.
    "Distribute content" just distributes binaries to distribution points. You can select a collection there, but that has nothing to do with clients. It just distributes content to DPs that are assigned to collections.
    Torsten Meringer | http://www.mssccmfaq.de
    Ok. That is helpful. I appreciate the response. I hate to ask another question, but I', still learning the product. In the Step-by-Step SCCM 2012 R2 CU4 Installation Guide from System Center Dudes, it says to create the collections by using their predefined
    queries. I tried to enter these as queries but I think I am doing so in the wrong area of the collection creation process. Could you break it down for me?
    Do you know of any good training (free) that is video based an breaks SCCM 2012 R2 down into smaller more detailed steps?
    Thanks,
    James
    James A+, Network+, MCP

  • I have an ipad 3 with vz, what do i need to do to make it work in europe

    I have an iPad 3 6.1.3 with cellular network with verizon. I am going to Europe in a couple weeks and need to use my ipad while im there. What do I need to do to make my ipad work?

    Since the EU does not use CDMA technology, your Verizon iPad won't connect to any cellular systems anyway, but it does not hurt to turn cellular data off to preserve battery life.
    Note that if you use Airplane mode that will turn cellular off too, but it also disables GPS (which you may need if you have a navigation app with pre-loaded map and POI data -- highly recommended if you don't know your way around).

  • HT204053 I am looking at purchasing an iphone and we have a ipad and ipod at home all under the same apple id. I would like my daughter to have a seperate id then myself for signing in for itunes, etc...what do I need to do to make this happen.

    I am looking at purchasing an iphone and have an my daughter has an ipad at home and I want to have seperate apple ids when we use them and download and such.. What do I need to do?

    If you want her to have a new iTunes account then there are instructions on this page for how to create one : http://support.apple.com/kb/HT2731
    Or if you don't want to give credit card details then follow the instructions on this page when creating the account : http://support.apple.com/kb/HT2534
    You can then use that account on the phone (Settings > iTunes & App Store for the stores, Settings > iCloud etc)
    All of your downloads from your existing account will remain tied to that account. If you want to use the same computer for syncing then you can do do, you can have more than one account authorised on a computer's iTunes (Store > Authorise This Computer menu option), but only one account can be logged in for purchasing/downloading. But if you use iTunes Match, automatic downloads or redownload an account's past purchases then you may tie that computer to that account for 90 days : http://support.apple.com/kb/HT4627 - so you won't be able to do any of those three things on a different account until the 90 days have completed (it shouldn't affect being able to make new purchases)

  • Testing on a Mamiya 645DF  with an Aptus II-7 back.  What do I need to do to make the files readable on Adobe Bridge CS6?

    Hi there.  I'm running tests on a Mamiya 645DF + with an Aptus II-7 back.  The RAW files are "mos."  What do I need to do in order to make the files compatible/readable in Bridge CS6 and Photoshop CS6?
    Thanks!!

    I do not see a camera named "Mamiya 645DF" in the Adobe list of cameras supported by any and all versions of Adobe Camera Raw (ACR).  However, the Leaf Aptus-II 7 has been supported since ACR 4.6 in CS3 and ACR 5.1 in CS4.
    Camera Raw plug-in | Supported cameras
    Unless Mamiya somehow messes with the raw format of the Leaf back, your files should be opened by any version of ACR that runs with CS6.  The current version is "ACR 8.6 for CS6".
    Try Purging the Cache for the offending folder(s) through the Tools menu in Bridge.
    Tools >  Cache > Purge Cache for Folder "xxxx".

  • I would like to buy an ipad for a gift for a friend that lives in Santiago,Dominican Republic.  What do I need to do to make the ipad function efficiently and properly in Santiago,Dominican Republic?

    I would like to buy an ipad for a friend of mine that lives in Santiago,Dominican Republic.  How and what do I need to do as far as set up of the ipad to make sure that it functions efficiently and properly in Santiago,Dominican Republic?  The availability of wi-fi is not very good, so should I buy an ipad model that has wi-fi and cellular capability?  I am quite new to all this technology so I would appreciate it very much if someone can explain step by by step and in simple terms how the ipad needs to be set up to work in this country.

    The Smart Cover only protects the front screen. You'll get scratches on the back plus it provides no protection for a small drop.
    I added a screen protector as it was cheap insurance protection.
    For my iPad 2, I bought an Adesso case/keyboard model WKB-2000CD http://www.adesso.com/en/component/content/article/49-coming-soon/455-wkb-2000cd .html Works great & looks good. The keyboard is easier to use than Apple's on-screen keyboard. Do a Google search using the model number to get the best price. About the same price as Apple's covers & it covers the whole iPad. Although the new iPad  is slightly thicker, it should fit this case.
     Cheers, Tom

  • What All I Need to know to make a connector

              HI,
              I am new to this stuff. I have read the specification and j2ee tutorial on J2ee
              connector architecture. I need to make a JMS Connector. I want to provide the
              very basic functionality into it. May be i can omit the complex functionalities
              like transactions,pooling and security etc etc.
              Can somebody guide me what all i need to know about Weblogic JMS provider to
              make it deployable on weblogic7.0. Also in case of non-manageable applications
              using my JMS connector what all i need to know and use about the weblogic7.0 jms
              provider and any API .
              Any kind of help will be appriciated..
              Thanks & Regards
              Akhil Nagpal
              

    See:
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device
    Unless you restore from an encrypted backup, y will have to reenter all password on the new device
    iTunes and encrypted backups
    You can protect your backup with a passcode using the Encrypt Backup option in the Summary tab. Encrypting your backup will back up your Keychain. This way, your email account passwords, Wi-Fi passwords, and passwords that you enter into websites and some apps will be remembered when you transfer to a new device. Learn how to create and restore from a backup.
    When your backup is encrypted, you'll need to enter the password when enabling or disabling encryption or when restoring from the backup.

Maybe you are looking for

  • One drive (sky drive) for sharepoint 2013

    Looking for support on the one drive: referenced here:http://support.microsoft.com/kb/2903984 We have Sharepoint 2013 and would like to use the sky drive (one drive).. We don't use Office 2013, but Office 2010 I found the link to the download of oned

  • ObjectInputStream+CipherInputStream hang

    I've started a simple client-server app and had communication working fine untill I tried to add encryption. Here's the faulty code with info on object initialization // init in and out cipher outCipher = Cipher.getInstance(algorithm); outCipher.init

  • IMac'24 08 + new iMac's video cards

    I know that in my iMac'24(2008) used mxm ati 2600 card. I just want to know - may i upgrade my old imac with new ati 4850

  • RMAN Error in DB13

    Hello All, We are running ECC 6.0 system in Oracle and we have scheduled the Full online backup+redolog backup eery weekend. But the backup fails with the following error BR0530I Cataloging backups of all database files... BR0278E Command output of '

  • How do you automatically expand conversations in the viewing pane to see all messages in the thread

    I'm getting super annoyed since apple has started condensing the conversation in  mail in the view window.  They have added the "See More from xxxxxxx" in the middle on the converations view pane.  How can you have those always automatically expand?