My program works but..... please help
heres my problem. my applet asks a math question ( what is x * y ) and user inputs answer in jtext field. when answer is correct, status bar displays " very good!"
if incorrect, status bar displays " sorry, try again". it does this fine, however when the user answer correctly a new problem should be painted on the applet. thats where my problem is, i cant get it to refresh the question.
here is a summary of my code.
public void init()
container....
Jtextfield....
public void paint( Graphics g)
paints the question here
public void actionPerformed(ActionEvent actionEvent)
if / elsestatements checking if answer is correct
public int calculation()
math.random() class method
i know i need to put a while loop in there but i dont know where and i dont know how to call the method that needs to be called. any guidance is greatly appreciated.
thanks
add stuff like this. Everything that is bolded add. NOTE, I am assuming calculate is your button.
boolean flag = false;
public void init()
container....
Jtextfield....
public void paint( Graphics g)
paints the question here
public void actionPerformed(ActionEvent actionEvent)
if(actionEvent.getSource() == calculate){
flag = true;
if / elsestatements checking if answer is correct
if(flag){
repaint();
flag = false;
public int calculation()
math.random() class method
}If this works could I have some Duke Dollars?
Similar Messages
-
I have my entire music library (purchased and burnt CD's) on my iPod Touch from one computer and I wanted to sync it all to my new computer. I was hoping it would all transfer via sync when I plugged it in but it doesn't seem to work. Please help?!
Ok, I had a glitch, forced to restart, and lost my train of thought.
Reinstalling iTunes should fix the major issue that might have gone wrong, perhaps your explaination points will disappear and everything will be peachy again.
But if they don't, you can open the XML file in iTunes Folder using a Text edit program to see what the common pathname is to the iTunes Music folder or where your content is located.
If you moved the itunes folder, it needs to go back.
I can't download iTunes to my Vista virtual machine to test it out right now because iTunes is down, so I can't verify the pathname, perhaps your issue and the iTunes being down are related somehow?
You don't want to import all your music again, but it's a option, but you lose all your playlists, that's what I'm trying to recover.
If oyu don't have a whole lot of playlists, then simply select all the explaimation point music and delete, select File from the menu and import your itunes folder again. -
I have paid for Creative Cloud - illustrator CC 1 year monthly plan, but it still show "Trial Expired". I have tried to sign in and sign out creative cloud many times, but still can't work. Please help!
Does your Cloud subscription show on your account page?
https://www.adobe.com/account.html for subscriptions on your Adobe page
Also,
This is an open forum, not Adobe support... you need Adobe support to help
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" -
I go to settings and switch "Automatic time" off and then back on. It works for a while, but then just goes back to being off. I've tried manually setting the time, but it just goes back to what it was before. If I send a text, it sends and then disapears. I can't see what I wrote! I went in to Apple to try and get it fixed, but they just restored my phone. It's still not working. Please help!
It's not hacker or a virus. You are experiencing what a number of users of iOS 5 are experiencing now - sluggish or less than perfect iPad performance. It seems that for some of us - memory management has gotten a little out of whack with this most recent update. Some of the basic troubleshooting steps that you can try are ....
Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
Reset 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.
Close apps in the recents tray. Go to the home screen first by tapping the home button. Quit/close open apps by double tapping the home button and the task bar will appear with all of you 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 to close the apps. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
If you have Safari crashing issues - Go to Settings>Safari>Clear History, Cookies and Data. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
None of these steps should be necessary as part of your daily routine - the iOS is supposed to handle all of this without any user input. Once again - for some of us - the iOS is letting us down.
Until Apple releases another update that resolves this issue for the "few" that suffer, keep these steps in mind and use them as needed. -
I just want to ask if there is any way i can fix my ipod touch 4G from watar damage and i dont think that a larg amount of water have entered and the ipod isnt working at all and i tried charging it but it didnt work so please help me, and thankyou.
Probably dead if you have tried to charge it.
You should never try to charge or turn on a wet electronic device.
You should let it dry for a week or so, then try. -
I tried updating my iPhone3g through itunes. Now i'm stuck in recovery mode and i've EVERYTHING even websites and such but nothing worked out! I've also tried restarting and fiddling with the home button but nothing still worked. Please help! What should I do??
Well, if you've indeed tried EVERYTHING, then you'll need to bring your phone to Apple for evaluation.
-
Brand new Mac user help please! How do you connect a 17" monitor to the MacBook? I have the monitor plugged into the Mac, but the F8 that I am used to with PC does not work. Please help. I am getting lots of spelling errors as the MacBook laptop screen is too small. Thank you so much! .
Contentmom6 wrote:
Brand new Mac user help please! How do you connect a 17" monitor to the MacBook? I have the monitor plugged into the Mac, but the F8 that I am used to with PC does not work.
Normally, you just connect the monitor to the MacBook using a VGA adaptor that you can buy from an Apple Store. Now try System Preferences > Displays > Detect Displays. You should now be able to select a display mode for the monitor. If it still doesn't work, then I'd check that everything is properly connected. I've had problems with colours disappearing due to a faulty connection in the VGA adaptor.
Bob -
When i plug my ipod in, it shows up on desktop as a hard drive, but wont show up on itunes. All my music/videos everything has been wiped off somehow, restored it and still wont work! Please help!
- Have you tried the troubleshooting here:
iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows
- You can try disabling the camer notification
http://support.apple.com/kb/TS1500
- Do you have any camera, scanner or similar software installed? That may prevent iTunes from seeing the iPod. -
I recently purchased a Canon 7D. I own Adobe Photoshop/Bridge CS5. I cannot open my raw images in Bridge. I have tried to download the plug in but does not seem to work. Please Help, I need to be able to open my raw images in Bridge ASAP. I do not want to upgrade to CS6 at this time.
If you had given us sensible information, I could look it up for you if your efforts fail.
Right now, I don't even know if you are on a Mac or on a Windows box.
BOILERPLATE TEXT:
If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
http://forums.adobe.com/thread/419981?tstart=0
Thanks! -
I have a 4s with ios 6 but when I place a call I can't hear the person I' m calling, the volume is high but it's not working. Please help.
I have taken it back to the Apple store genius bar, but they say they don't see anything wrong. Well unless you use it all day and experience the problems when they happen, you wont see anything wrong. But there are lots wrong with it. But this would be the same store as I purchased the phone. And they backed up my old Iphone 4, but were not able to get anything to load back onto my new phone. So, I lost pretty much everything. But over time, some of my contacts have started showing up, although i am still missing over 800 of them.
-
I have brought a iPhone 5s and installed software but my bluetooth is not working. Please help me
What are you trying to connect the iPhone to and what is happening when you try?
-
I got my Iphone 3gs unlocked, but Navigation and Compass are not working. Please help if anybody had faced this problem and got it resolved.
Only the carrier that the iPhone was locked to can unlock. There you go, hacking void any support from this forum.
-
My trackpad in Macbook is not working properly. The tap and double tap is not working but other gestures are working. Please help me..thanks
Portables and Magic Trackpad: Jumpy or erratic trackpad operation
Might be something from that link that will help. -
I restored my ipod and now the Nike app is crashing on me. I've tried turning it off and on again, but it still doesn't work. Please help.
Hi,
Have you tried a Reset...
Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
The Apple logo will Appear and then Disappear...
Usually takes about 15 - 20 Seconds...
Release the Buttons... -
I was updating google translate on my phone then the screen just black out. I thought battery went flat but after I put on charge, it's still not working. Please help!
Hello 74birdy
The article below will assist with troubleshooting your iPhone not responding.
iOS: Not responding or does not turn on
http://support.apple.com/kb/TS3281
Thanks for using Apple Support Communities.
Regards,
-Norm G. -
hi
Hello
Since yesterday evening. My itunse program does not work my mobile.
Note
I update the program to ios7
Please help me
Thank youI found this strange glitch that wouldn't let me open my iTunes Store. I tried all the reset options and still iTunes would close a second after it opened. I fixed this. Instead of using the iTunes Store icon on your home page to open it. Go into music and click on store. It will say "Cannot Connect To Store". Just tap ok. Then tap on "featured" on the bottom of the screen. That will take you to the store front page. After that is loaded. Back out and the icon for iTunes Store on the home page should work just fine. Hope that helps.
Maybe you are looking for
-
I have for the past three and a half hours have been trying to redeem my itunes gift card. It is for $25.00 and I need to purchase a book. My card is unreadable....The first letters and numbers are fine but the middle....looks like four numbers/lette
-
How do I connect speakers to ipod
Recently purchased Harmon Kardon Soundsticks I second hand, and an ipod dock. Both have a USB port how do I connect the two together? I am female and not very good with electrical goods!!!! Windows XP
-
Why is a special character  inserted into my drafts?
After I save a draft, and then return later to finish it.... I frequently (more times than not) find that Thunderbird has inserted a ton of  characters in the email, all over. Usually at the end of every sentence. Often the are 3 in a row, with spac
-
Changing logical system name on ECC
Hi, We have made copy of production to our test environment. Next, we created a number of copies of the test environment. We now want to hook the copies up to BI, XI etc. where we don't have multiple test environments, which means that a single BI
-
DC voltage for RTX DUALphone 4088
Hi, I'm looking at the Dual phone 4088 for use in my motorhome. My wireless broadband modem runs on a 12V DC adaptor at home, but I run it directly on 12V when on the road. Q: What is the DC voltage required by the base station for the Dualphone 4