How do you do this?

I'm still as lost as ever with my Button project. Can anyone make a simple Button program that exits when you push the button? My program so far uses Graphics2D to create a Title Screen of a game in Full Screen Mode. It doesn't have the X for Close, or a Minimize, and seems to work like a real game in this sense. The Title Screen has an image which is the background, another image as the title/logo, and even has a WAV that I run to play music.
I want to add a button to the title screen which would exit the game. I created a button using JFrame, but the problem is JFrame. I should be using Graphics2D, but I don't know how to make a button using Graphics2D. When I make the button with JFrame, the button itself is in a seperate window with it's own X to close, Minimize, etc. Naturally, this isn't how a game should look. How do I make a button with Graphics2D or somehow combine the button drawn with JFrame and the Graphics2D drawn background?
Thanks

I'm not sure I'm completely following but...
Could you draw a button (a rectangle or something) on the image, add and a listener to the entire Graphics2D and then only execute code if the mouse is clicked at the correct relative coordinates?
I haven't worked with graphics a whole lot, so I'm just throwing in brainstorms...

Similar Messages

  • How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    unless i'm missing something, i think you got mixed up, this is easy google for walk throughs
    i'm assuming this is the new 3tb tc AC or 'tower' shape, if so, its wifi will run circles around your at&t device
    unplug the at&t box for a minute and plug it back in
    factory reset your tc - unplug it, hold down reset and keep holding while you plug it back in - only release reset when amber light flashes in 10-20s
    connect the tc to your at&t box via eth in the wan port, wait 1 minute, open airport utility look in 'other wifi devices' to setup the tc
    create a new wifi network (give it a different name than your at&t one) and put the tc in bridge mode (it may do this automatically for you, but you should double check) under the 'network' tab
    login to your at&t router and disable wifi on it
    add new clients to the new wifi network, and point your Macs to the time machine for backups

  • HT4191 iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.

    iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.  I've seen reference to the  "My iPhone" local storage put no mention on how you create this folder or access this folder within the Notes app.  I realize storing information in a local storage like this provides no syncing between other iDevices but that is exactly what I'm looking for.  I'm running iOS7.0.4 on a iPhone 5S, and a iPad Air.  Any help would be greatly appreciated.

    If you go to Settings > Notes > Default Account you will see "On My iPhone" as the default account and the only choice if you have not enabled syncing Notes in Settings >iCloud or Settings > Mail, Contacts, Calendars. If you have enabled syncing you can still select "On My iPhone" as the default account. When you are in the Notes app you won't see any accounts listed if you have not enabled syncing because they are all in the On My iPhone account and that is the only place possible. It is not a folder that you create.

  • I need to create a ghost image of my G4 iBook (OSX 10.3.9) and replace the OS9 on my G4 tower with the created iBook ghost image. How do you do this?

    I need to create a ghost image of my G4 iBook (OSX 10.3.9) and replace OS9 on a G4 tower with the Ghost image. How do you do this? Will my applications still work?
    The iBook is running Pather, i have tons of programs i use on it, project files, etc... and my G4 Mac tower is more powerful, faster, and more reliable than the iBook. I basiclly just want to take the entire OS, programs and files... create an image, and drop the image on the G4 Tower so it basically will function just like the iBook. Like a mirror image of everything that is on the iBook.  I know that you can create image files in the Disk Utility on Panther, but will that back up the entire OS with settings, programs, files and all?  ive never done anything like this before, so i wanted to post this up to see if i would get an answer. In the meantime, im reading "Mac OS X, Help Desk Essentials By Owen Linzmayer" to see if i can find the steps to do this.
    Any help would be greatly apprciated. Much thanks!

    Can't be done as an exact copy from one Mac to the other.  The operating systems are system specific. First make sure your system doesn't need a firmware update to get 10.2 or later on it. You'll need to install 9 on it if it does, direct from a 9 retail CD that is compatible with it *.  This disc can't say Upgrade, Dropin, or OEM. To determine compatibility, identify your G4 tower:
    http://support.apple.com/kb/HT3082
    http://docs.info.apple.com/article.html?artnum=42739
    Then look at the OS 9 compatibility:
    http://docs.info.apple.com/article.html?artnum=25517
    Then apply the correct update
    http://docs.info.apple.com/article.html?artnum=86117
    The last Mac OS 9 to come retail is 9.2.1, and that's newer than 9.0.4, 9.0.2, and 9.1.
    Your ghost image can be done using cloning software, but then you'll have to use a retail 10.3 installer and 10.3.9 combo update on the G4 tower.  Then use the Migration Assistant to import the data from the clone of the iBook. The 10.3 retail disc looks like * and does not say upgrade, dropin, or OEM.  The 10.3.9 combo update is here:
    http://www.apple.com/support/downloads/macosxcombinedupdate1039.html
    The clone to an external hard drive can be done with these instructions*:
    http://www.macmaps.com/backup.html The import of the external hard drive with the migration assistant can be done with these instructions:
    http://docs.info.apple.com/article.html?artnum=25773

  • After upgrading my iPhone4 to the latest IO it no longer connects to wifi, how do you fix this?

    After upgrading my iPhone4 to the latest IO it no longer connects to wifi, how do you fix this?

    knifepainter wrote:
    What I know is that the phone worked perfectly fine until I upgraded the software. I've tried resetting the network settings to no avail. I've shut the phone off, put it in a ziplock baggie and then into the freezer for 15 minutes. This made the wifi work temporarily but then it goes back to being grayed out. The wifi does not work at other wifi sites away from my home as well. Seems like an apple issue to me and would appreciate someone coming up with a fix, apparently I'm not the only one having this problem. Thanks for replying to my query, any ideas?
    It's likely a hardware issue.  The iOS will not directly cause this issue.
    Use this article first:
    iOS: Wi-Fi settings grayed out or dim - http://support.apple.com/en-us/TS1559
    If that fails to resolve it, then try setting it up as new and testing again.
    How to erase your iOS device and then set it up as a new device or restore it from backups - http://support.apple.com/en-us/HT4137
    If the issue remains even after set up as new, it's a hardware problem, not a software problem.  You'll need to contact Apple for you hardware service options.  If within warranty it should be free.  If not, expect to pay $149 USD + tax if it's an iPhone 4, $199 USD + tax if it's an iPhone 4S.

  • Need to show proof of purchase to my insurance company, but my phone was replaced by apple so has a different imei number to the one on my receipt, how do you sort this out??

    Need to show proof of purchase to my insurance company, but my phone was replaced by apple so has a different imei number to the one on my receipt, how do you sort this out??

    Contact Apple and see if they can provide any documentation of the device swap.

  • My iPhone is disabled, and I need to restore it, how do you do this?

    So I was just on the phone with Apple, and apparently you now have to pay for help on the phone? Stupidest idea ever, but what are you going to do? Anyways, some of my friends thought it would be funny to disable my phone, and now it says "Connect to iTunes" and whenever I connect it to iTunes, it says "iTunes could not connect to the iPhone "jakes iPhone" because it is locked with a passcode. You must enter your passcode on the iPhone before it can be used with iTunes." How do they expect me to enter my passcode when it's disabled? How do I fix this, it's bugging me that I can't get into my phone. Also, I heard you have to restore your iPhone, how do you do this? I don't know how the new iTunes works, it's really frustrating.
    P.S- When I tried to restore it, it says "Are you sure you want to restore the iPhone "jakes iPhone" to it's factory settings?"
    I don't want to restore my phone to it's factory settings, that's what it doesn't get.
    The point of the passcode is so that it doesn't get any person information taken away. But what's the point if this happens? I mean, either way, I have to delete all the crap anyways to get it working again... Please help me, thanks.

    The point of a passcode is to protect your information from "friends" who do things to you like they just did.  They have disabled your device and you have to restore your phone in iTunes.  Hopefully you have performed a backup recently and you can restore from that backup.  As far as paying for support, you don't have a mechanic diagnose and repair your car problems without paying so why would Apple or any other company not charge for support?  However, any charge that you have to pay for support to fix this issue......I would have my so called friends pay the bill.

  • I cant download itunes on my computer because it says " service 'apple mobile device' failed to start. verify that you have sufficient privileges to start system services. what does this mean? how do you verify this?

    I cant download itunes on my computer because it says " service 'apple mobile device' failed to start. verify that you have sufficient privileges to start system services. what does this mean? how do you verify this?

    I am having this same problem. I took Kappy advice on restarting the Apple Mobile Device Service, however that did not work. I got this message in a pop up window that came up immediately.
    Windows could not start the Apple Mobil Device Service on local computer.
    Error 1053  The service did not respond to the start or control request in a timely fashion.
    I have already uninstalled itunes, all the related programs and I cannot reinstall, this Apple Mobil Device message stops the install.
    Can anyone please help?

  • Iphone ios5..I upgraded to ios5 on my iphone 4 and in the demo video on the Apple website it shows a cute animation screen with the user dragging what appears to be balloons on a string how do you access this screen?

    iphone ios5..I upgraded to ios5 on my iphone 4 and in the demo video on the Apple website it shows a cute animation screen with the user dragging what appears to be balloons on a string how do you access this screen?
    Not sure if this is a game or app or not...it shows nothing about it and explains nothing about it...but it is there on the demo video on the apple website for the add to upgrade to ios 5...it shows the user dragging threads and the little icon monster at the bottom of the screen catches them

    Yea thats a game called "Cut the Rope" and it can be found in the App Store for $0.99 or you can buy the Lite version for free.

  • I have a lenovo S410 Touch laptop -with windows 8.1 -Itunes 11.1.1 ,i am trying to connect my iphone 4s but does not connect , it shows that it wants to connect , how can you connect this?

    I have a lenovo S410 Touch laptop -with windows 8.1 -Itunes 11.1.1 ,i am trying to connect my iphone 4s by USB cable but does not connect , it shows that it wants to connect , how can you connect this?

    http://support.apple.com/kb/ts1538

  • When trying to sign in to the iTunes store I get the following message, "We could not complete your iTunes Store request. An unknown error occurred (5002). There was an error in the iTunes store. Please try again later."  How do you resolve this?

    When trying to sign in to the iTunes store I get the following message, "We could not complete your iTunes Store request. An unknown error occurred (5002). There was an error in the iTunes store. Please try again later."  How do you resolve this?  Has been going on for days now.

    I started getting this message a couple of days ago.
    Started a thread of my own before I saw your post. https://discussions.apple.com/thread/4660828

  • I can't click on the tabs on my desktop firefox, firefox 30, how do you fix this?

    I have reset and still get this issue, I would go and click on open new tab and then I would see the tab on the toolbar. I would go and try to open the tab by clicking on it and it would not work. How do you fix this? I know about shortcuts but its irritating and I share the computer and the shortcuts is slowing productivity. Thank you in advance.

    The mouse does not activate a tab, but a keyboard shortcut like Ctrl+2 to activate the second tab on the bar, does work?
    The Reset was a good thing to try. But some add-ons may reinstall after a Reset so those are worth reviewing again.
    Users have reported some new tab dysfunction is associated with Conduit add-ons, such as a Conduit plugin and/or a "Community Toolbar" extension.
    You can check for and disable extensions on the Add-ons page. Either:
    * <u>Windows: Ctrl+Shift+a</u> , Mac: Command+Shift+a
    * "3-bar" menu button (or Tools menu) > Add-ons
    In the left column, click Extensions. Then, if in doubt, disable.
    Often a link will appear above at least one disabled extension to restart Firefox. You can complete your work on the tab and click one of the links as the last step.
    Does that help with the "+" button? If so, could you name the specific extension that caused the problem?
    You might also check the Plugins section of the Add-ons page. You can use "Never Activate" to disable plugins that you don't ordinarily use.
    Does that help at all?

  • Just bought a new printer ( Canonpixmaip4920) all other files print ok but when I print a I Tunes cover playlist in comes out backwards or mirror image? How do you fix this?

    Hi,
    I just bought a new canon pixma ip 4920 printer... all other files print ok except when I try to print a playlist from I tunes it prints out backwards or a mirror image? How do you fix this?
    Jim

    Unfortunately changing the epub text size does not change the view at all. The images do not seem to change when the text size setting is changed.
    The resolution of my machine is already at the max setting, so increasing the resolution is kind of impossible.
    Any other suggestions I could try?  Thank you for your suggestions!

  • I just installed the yahoo messenger. Every time I do that my extensions go missing. How do you fix this instead of having to keep re installing firefox?

    I just installed the yahoo messenger. Every time I do that my extensions go missing. How do you fix this instead of having to keep re installing firefox?

    hello, this sounds like the files in your [[Profiles|profile folder]] that store the information about your extensions might have become corrupted. please go to ''firefox > help > troubleshooting information > profile - show folder...'' then windows explorer should open up your profile folder. in there look for the files named extensions.ini, extensions.sqlite, extensions.sqlite-journal (and in some cases also extensions.txt, extensions.rdf). delete or rename those files and quit firefox, they will be regenerated the next time you launch firefox.
    also see [https://support.mozilla.org/en-US/kb/Unable%20to%20install%20add-ons#w_corrupt-extension-files Corrupt extension files]

  • Preview: In a group of PDF files in the same window, going to the next or a previous PDF file displays the bottom of PDF by default, not the top. How do you change this?

    Preview: In a group of PDF files in the same window, going to the next or a previous PDF file displays the bottom of PDF page by default, not the top of the PDF page. How do you change this? In Mac OS 10.9 and previous, going to the next or previous PDF file displays the top of the PDF by default. Is there a way to change this back? When I go to the next or previous PDF file, I want to first view the top of the page, not the bottom. This really doesn't make any sense. Any help? Thanks!
    MacBook Air (13-inch, Mid 2012)
    2 GHz Intel Core i7
    8 GB 1600 MHz DDR3
    500 GB Flash Storage
    Preview Version 8.0 (859)
    Mac OS 10.10.1

    That to me seems like a bug in Yosemite.
    Apple Feedback http://www.apple.com/feedback/
    Bug Reporter https://bugreport.apple.com/

  • I am selling my apple mac pro but do not know how to deregister and register it to the new owner; how do you do this?

    I am selling my apple mac pro but do not know how to deregister and register it to the new owner; how do you do this?

    Before you sell or give away your computer, in addition to the steps mentioned in this support article, take these steps:
    Run Apple Diagnostics or the Apple Hardware Test. The buyer will do this (or he should), and you don't want to be surprised by the results.
    Reset the PRAM and the SMC, which might contain personal information.
    If you set a firmware password, remove it by running Firmware Password Utility in Recovery mode.
    If you activated FileVault in OS X 10.7 or later, turn it off.
    If you use Boot Camp, the partition must be deleted
    If you created any other data partitions on the internal drive, remove them in Disk Utility.
    Erase the data partition(s) with the option to zero out data. An SSD doesn't need to be zeroed.
    You can't legally or practically transfer any software downloaded from the Mac App Store to the new owner of the machine, even if it was free. That includes OS X, so if you upgraded to OS X 10.7 or later, you must reinstall  an older OS, either from the installation media, if applicable, or by booting into Internet Recovery (option-command-R at the startup chime.) If you installed from physical media, deliver those to the new owner.
    If you're selling the machine, or donating it in working order, and it originally shipped with OS X 10.4 or 10.5, then you have the option of installing either from the discs that came with it or from a retail Snow Leopard disc (which you must then transfer with the machine.) The buyer should understand that if he doesn't get the original discs from you, he won't get the bundled iLife applications or the Apple Hardware Test. Replacements for the original discs can be ordered from Apple.
    The new owner will have to redownload any software that came from the App Store, including OS X upgrades, under his or her Apple ID. If you ever updated the bundled iLife applications (Garage Band, iMovie, and iPhoto) through the App Store, you can't transfer those either.
    Remove the machine from your list of registered products. If it's still covered by an AppleCare Protection Plan, transfer the coverage to the new owner by following the instructions in the AppleCare Terms and Conditions (under the heading "Transfer of Plan.")

Maybe you are looking for