Problem trying to reset button.

I'm making a fortune cookie that prints fortunes on the screen.How can I reset the button so that when I click it, it erases the message on the Applet, and then allow me to click it again for a new fortune.I want to use only the one button I have, Im just not sure how to reset it after each message.Do I need to make some sort of loop? I put the part of the code I'm talking about.Its just a simple program with a fortune cookie and everytime you click the JButton it gives a message.
public void actionPerformed(ActionEvent e)
          Random num = new Random();
          final int LIMIT = 4;
          if(num.nextInt(LIMIT)==0)                           //Using if and else if statements
          Graphics draw = getGraphics();
          draw.setFont(bigFont);
          draw.setColor(Color.WHITE);
        draw.drawString("About time I got out of that cookie!",30,140);
          else if(num.nextInt(LIMIT)==1)
          Graphics draw = getGraphics();
          draw.setFont(bigFont);
          draw.setColor(Color.WHITE);          
        draw.drawString("Rubber bands move in the right direction.",3,140);
           }

please respond to your other two outstanding threads before starting a new one. Besides being polite, it will help motivate folks to help you again.

Similar Messages

  • On starting up my new iPhone 4s, it freezes on the apple logo. I have tried the reset buttons trick and have tried restoring again too but nothing works. Any other ideas? Or is the phone simply corrupt in some way?

    On starting up my new iPhone 4s, it freezes on the apple logo. I have tried the reset buttons trick and have tried restoring again too but neither works. Any other ideas? Or is the phone simply corrupt in some way?

    Did you try to connect in recovery mode and restore without using the latest backup?
    Recovery mode and  How to back up your data and set up as a new device
    If setting up as new device does not work, you'll have to get it serviced or looked at by visiting an Apple Store.
    Did you try to remove the ipsw firmware file and restore, to make iTunes download a new copy from Apple?
    Those files are located here:
    Rename, move, or delete the iOS software file (.ipsw)
    iTunes uses "ipsw" files to restore your iPod or iPhone. If those files are unusable, then try deleting them, renaming them, or moving the file to a different directory. This will cause iTunes to download a new copy of the IPSW. When a restore issue is specific to a user, it is likely due to an unusable .ipsw file. If removing the .ipsw file does not resolve a user-specific restore issue, then the issue is caused by other user-specific security software settings or iTunes preferences. Creating a new user will also cause new .ipsw restore files to be downloaded in the new user. You can find the ".ipsw" files in these locations:
    Mac OS X
    iPhone
    ~/Library/iTunes/iPhone Software Updates
    iPad
    ~/Library/iTunes/iPad Software Updates
    iPod touch
    ~/Library/iTunes/iPod Software Updates
    Note: The tilde "~" represents your Home directory.
    Windows 7 and Vista
    iPhone
    C:\Users\[username]\AppData\Roaming\Apple Computer\iTunes\iPhone Software Updates
    iPad
    C:\Users\[username]\AppData\Roaming\Apple Computer\iTunes\iPad Software Updates
    iPod touch
    C:\Users\[username]\AppData\Roaming\Apple Computer\iTunes\iPod Software Updates
    Note: If you don't see the AppData folder, you may need to show hidden files.
    Message was edited by: Ingo2711

  • HT5312 Does anyone ever have so much problems,trying to  reset securityquestions???

    Does anyone out there ' had so much problems as I'm -- trying to reset my security questions,over and over again -they ask you to re -enter password to get in to different places they send you,I never in my life  had so much problems with Apple??? How can I reset my security questions????

    The Best Alternatives for Security Questions and Rescue Mail
        a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
        b. Call Apple Support in your country: Customer Service: Contact Apple support.
        c. Rescue email address and how to reset Apple ID security questions.

  • My Tungsten E note pad (hard) button nolonger works after Hotsync with Centro software. How can I restore my note pad hard button? I've tried the reset button.

    null
    Post relates to: Tungsten E
    This question was solved.
    View Solution.

    abdooleotoole wrote:
    The only option available when I go to preferences is (remember last catergory). Am i looking in the wrong place?
    Post relates to: Tungsten E
    Yes, wrong place.  You are pulling down the Menu from the Launcher screen.
    Look for a program icon called "Prefs". There will be numerous settings available inside this program.
    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!

  • Inactive (or broken) reset button on my Ze

    Hello! I recently tried using the recovery tool on my zen V to diagnose any issues. The player had been charging on the computer for some time but was not being recognized by the computer itself (not unusual). So when I tried to use the recovery tool, it obviously said there was no player connected and thus couldn't continue the diagnosis. That is fine and dandy but the problems now are much much worse... After that, I tried removing it and re-plugging it in. The player was detected but not recognized by the computer (strange, I've used it on this computer before). I wasn't overly concerned yet but then the player itself started acting strangely --> freezing while "restoring library". I used the reset button and went to the recovery mode to reboot the player. The player rebooted successfully and restarted the song it had cutoff when the battery died. I tried going to other menus and then the player froze again. Once again, I used the reset button to get into recovery mode and tried to re-boot. It once again froze when trying to restore the library... so I tried the reset button yet again. Finally it loaded, started playing the song again and when I tried switching the menu, it froze YET again! Now, my reset button will not work and it is stuck with the screen on, sitting in the menu section. Does anyone have any suggestions as to what I can do I've owned the player for < year.

    Mark,
    Is the web interface simply not loading or do you not have the password? Your DHCP range does not matter unless there is another device on the network that is currently assigned 192.168.1.254. If that is the case you will have trouble accessing the web UI. It is usually easiest to plug ONLY a PC and the switch together and assign a static IP to the PC:
    IP Address: 192.168.1.200
    Subnet Mask: 255.255.255.0
    Default Gateway: None
    DNS Servers: None
    This will allow you to access the switch without interference from other network devices. Remember to change the PC back to DHCP when you are done. If you do in fact have an IP conflict you should also change the switch to a different static IP.
    You can also access the switch using a console cable. You can check the settings and see if the web interface has been disabled or you can reset the password in case you lost it. Check the Admin Guide for details:
    http://www.cisco.com/en/US/docs/switches/lan/csbms/sf30x_sg30x/administration_guide/78-19308-01.pdf
    Let us know if you have any other questions.
    - Marty

  • How to hide reset button in af-query panel in ADF

    Hello All,
    i am using Jdeveloper version- 11.1.2.0.38.60.17 ,i am facing problem with hiding reset button in "af-Query panel".
    kindly suggest me how to hide it. it's urgent.
    Thanks & Regards
    AbhijeetPS
    Edited by: 967068 on Oct 23, 2012 12:39 PM

    Hello All
    I have solved this problem.
    Go to Query panel properties inspector and set Display mode = simple
    and drag an af- command button outside of the query panel.
    <af:commandButton text="Search" id="cb6" actionListener="#{bindings.Execute.execute}"/>
    Thanks
    AbhijeetPS
    Edited by: AbhijeetPS on Oct 23, 2012 6:38 PM

  • The icloud backup window is stuck on my IPAD.  I have already tried to reset the IPAD

    The icloud backup message window in stuck on my IPAD,  I tried the reset button and it did not work.

    My ipod is already in recovery mode just when i plug it in it says that i must enter my password but i cant since its in recovery mode.

  • I have apple iPhone 4S upgraded to iOS 6.0.1 and everything was working fine suddenly my Wifi was not connecting and found the wifi on/off button is greyed out and to enable it I tried all resets but still my problem have not solved, still wifi is off

    I have apple iPhone 4S upgraded to iOS 6.0.1 and everything was working fine suddenly my Wifi was not connecting and found the wifi on/off button is greyed out and to enable it I tried all resets but still my problem have not solved, still wifi is off

    Same here.... No fix. Replacing is the option apparently and if you're out of warranty, you're SOL. That was as per the "Genius" at Apple.

  • HT201412 I have to hit my home button a half dozen times to make it work.  I've tried to reset the phone and updated the software.  Is this a hardward problem?

    I have to hit my home button a half dozen times to make it work.  I've tried to reset the phone and update the sorfware.  Is this a hardware problem?  Where do I go to get it fixed?

    At Apple Store this is handled with Replacement iPhone exactly like yours. If there is AppleCare or Warranty it will be covered, otherwise there will be a charge of $150 - $199 depending on iPhone model. If iPhone 5 it will be covered. If you want to try Virtual Home Button. Settings App > General > Accessibility > Assistive Touch > ON > tap new white screen button > Home.

  • I can't back up my information to iCloud and sync them to my iPad. I tried to reset the account by erasing everything in the account but the problem is still there. Can someone let me know how to delete everything in my account and start a new backup.

    Hello,
    I'm having probelms backing up my information to my iCloud account. I tried to reset the account and erase everything in my account but the problem is still there. The problem is that my iPhone is not able to complete the backup process and all it is saying a problem occured.
    Someone Pleas let me know how to reset my account, delet everyhting in the Cloud and start a new backup.
    Thanks very much,
    Dalal Tammar

    Welcome to the Apple Community.
    You might try a forced shutdown to begin with, hold down the top and home buttons together until the device shuts down, then restart it.
    First check that your device is correctly connected to the wifi/internet (settings > wifi)
    If your back up continually fails, you might try turning off back up on your mobile device (settings > iCloud > storage & backup) and then deleting the backup file from iCloud by swiping the backup file on the mobile device (settings > iCloud > storage & backup > manage…) and then turning back up on again.
    If this doesn't help, try turning off some items for back up in a pattern to try to establish if your problem is being caused by specific data on your device.
    Being able to back up to the cloud can be very useful, especially if you don't have access to a computer or have infrequent access to one, however unless you specifically need to use iCloud for back up, you will find backing up to iTunes significantly more convenient and possibly more reliable.
    More about iCloud v iTunes Back Up

  • My Ipad2 won't turn off.  I've tried the reset method,  holding both buttons down for at least 10 seconds, but this doesn't work. I'm on version 5.1.1 and all other functions work except that I cannot get onto the internet via wi-fi either.  Help ??

    My Ipad2 won't turn off.  I have tried the reset method by holding both buttons down for at least 10 seconds, but this doesn't work.  I can't get onto the internet via wi-fi either (don't have a 3G card fitted).  All other functions seem to be working OK including charging. Not had this problem before, but I recently upgraded software to 5.1.1 so is there a bug in there somewhere?

    Look at last link.
    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    Change the channel on your wireless router. Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130?tstart=60
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • My iphone 4 locked up for several hours. i then tried to reset by holding down the home button and power button at the same time for 10 seconds and then the home button for 10 seconds. it is now completely black. what do i do? couldnt restore it in iTunes

    My iphone 4 locked up for several hours. i then tried to reset by holding down the home button and power button at the same time for 10 seconds and then the home button for 10 seconds. it is now completely black. what do i do? couldnt restore it in iTunes. Has anyone had this problem? Help!

    Same thing happened to me today. I wasn't even using the phone for the past 6 hours and suddenly I can't connect to the internet, none of my internet apps would work - nothing. I tried to call AT&T from the iphone and it locked up - couldn't turn it off, change to the home screen - nada - brick.
    Did the Home/Power button thing and that worked but this I've only had this phone for about 4 weeks and it's locked up more times than my 3GS did the whole two years I had it! Ridiculous

  • The volume on my iPad 3 has gone. I've checked the mute button, tried restarting, resetting etc and nothing has changed. I can't hear the music, hear any sound from videos. Most times the video stops playing after a seconds. My iPad 3 is only 2 months ol.

    The volume on my iPad 3 has gone. I've checked the mute button, tried restarting, resetting etc and nothing has changed. I can't hear the music, hear any sound from videos. Most times the video stops playing after a seconds. My iPad 3 is only 2 months ol.

    If you have lost all sound and video is freezing on you, that ain't good. Your iPad is two months old so I would not hesitate to contact Apple at all. You are entitled to 90 days of phone support.
    http://www.apple.com/support/ipad/contact/.
    If you want to try a couple of things on your own, try quitting all apps and then reboot the iPad - not so much for the sound issue itself - but more as a general "start all over again" sort of approach. It might help with the video freezes.
    Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar. Reboot the iPad.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    If you use headphones on occasion, you can try plugging and unplugging those as well and see if the sound comes back.
    You could even try restoring the iPad to factory settings and then restore from a backup, but unless there is something totally hosed on the iPad, that should not be necessary with a two month old device - of course assuming that you didn't drop the iPad or do something accidental that could be causing the problems.

  • Iphone screen gets completely white after it locks. Already tried restart, reset, restore. Still the same problem.

    The screen of my 3GS iphone went completely white, it´s not really shuted down but I can not see anything. It comes back to normal (although it works quite slowly) when I restart it, until the screen blocks again or after I receive a phone call. I´ve already tried to reset and restore the phone, but it continues with the same problem. Please help!!

    Hold down home and power button at the same time when it happens

  • NF980-G65 Must press reset button to get post boot problem.

    I've seen other posts here & on New Egg where I ordered the MSI 980-G65 Mobo, about when booting for the first time you may find you need to press the reset button to post boot. It seems this is not an isolated problem.
     I read the mobo book while building & read the first thing to do is get into the Bios & load optimized defaults on page En-32. I did that & I always have to press the reset button to post boot every time I start up for the first time. Any self restarts after that are ok. I installed Gskill Ripjaw series DDR3 1600Mhz ram & set the voltage for 1.5v. It booted with ram default @ 1333Mhz. I set the NB freq to 1:4 to set it to 16oo Mhz, I thought it was cuz you have  to OC the settings to get the ram to run @ 1600Mhz. I still had to press reset to get it to post. I know that making any changes other then keeping default settings may cause these problems. I also read here someone else stated to clear the CMOS, move the ram around & it worked for him. I didn't do that.  I decided to load the failsafe defaults, save it, & restart. It booted ok at cold boot. So, back into the Bios I reset all my settings all over again, saved it, rebooted ok from cold start.
     One thing to know, The setting for ganged ram @ 128bit is duel channel mode. The unganged setting puts you in single channel mode @ 64bit.  Useing 2 sticks, 2X2GB in Dimms 1&2 as per the mobo book duel channel mode arrangement. CPUZ will verify that your in duel channel mode.
     My thanks to the person who also posted about this problem.

    Hi
    I hope you don't mind me replying to this thread but it hasa a lot of my problems in it.
    I have just bought an NF980-G65 mob., with an AMD Phenom II X4 955 (Deneb 4c)
    3.2 GHz, DDR3-1333, 2 MB L2, 6 MB. I also bought the G-skill 1600 ram, I was a bit put of when it came as it was for an Intel pro, as stated previous.
    I have it set up with two Nvidia 7800gt G.cards.
    I installed a new hard drive W.Dig. 650gb black. when I tried loading win7 64 i kept getting a blue screen with various faults on it.
    It would work as far as the grey line "loading windows" and even the logo but would then crash.
    The amazing thing is that i put my old hardrive back in and it booted up as 32bit win7 and loaded the drivers.
    this seemed to work until i tried to install a game and it crashed again all i saw was a quick message about "memory"
    needles to say i have returned the g-skill ram as that was the only thing not in the mob recommended ram.
    I am with any ram now and I'm having difficulty finding somewhere that has a stock of recommended ram i.e.
    Patriot PGS34G1600LLKA, GeIL GV34GB1600C8DC, or lots of very expensive Kingston. £100 is about my limit.
    Any way that said, as you are running G-Skill ram do you think i had another problem?
    the one i bought was GSKill 4GB DDR3 Dual Channel Memory Kit (2x2GB) PC3-12800 1600MHz (7-8-7-24)
    Model Number: F3-12800CL7D-4GBRM
    could you confirm the model number of the g-skill in case mine was a differant type.
    thank you

Maybe you are looking for

  • Compaq 621

    Hi,  i am using compaq 621 laptop. Now there are few keys which are not functioning at all. What should i do? Do i need to change the whole keyboard. I need a battery for my laptop too and my DVD drive is not working. Is it good to repair all this? H

  • HT203180 How can I delete old rental movies that are still on my iPad, but no longer viewable?

    How can I delete old rental movies that are still on my iPad, but are no longer viewable because the rental has expired?

  • How do i set ibooks author to UK english

    I cannot change the language used by iBooksAuthor to UK English, so it continually wants to change words like colour or centre. My MBA preferences are set to English UK and the region is UK. Can anyone help

  • IPv4 to IPv6 RDP Access

    Hi; In our ınfrastructure we use dual-stack. We configured our cluster firewall and router (BGPv6). Now we have an application server whichs 's run only over IPv6 address. We want to connect this server over RDP service from our edge sites which's ru

  • Safari 3.1.2 for mac loading problems

    hi, the blue bar that loads in the address bar will move about a centimeter, and then stop, if I refresh it 1-5 times it works. and firefox no longer works at all on this thing.