Homer want DONUT!

Key Bindings: up = 'w', down = 's', left = 'a', right = 'd'
ERROR: HUMAN FAIL. You must have JAVA PLUGIN installed on your COMPUTING DEVICE.

Instructions to Get This Working in Eclipse

If you just download the source and add it to a new project like we have been doing, then you'll notice that the images do not load. This is because I'm not using absolute URL's to refer to their location (which is here, on the cs.uc.edu webserver). This is fine for applets, but for the images to load when you run your applet in Eclipse, you'll have to do the following...
  1. Create a new Java Project called HomerWantDonut
  2. Add a new Java Class file called HomerWantDonut
  3. Copy-n-Paste the source code from here into your new file: HomerWantDonut.java
  4. Next, right-click each of the images below and save them to your Desktop.
  5. Then, in the Package Explorer window, right-click on the (default package) icon for this project and select Import...
  6. In the menu that appears, select General → File System.
  7. Browse to your Desktop directory and select the two images you just saved there, and then click Finish.
Using this method, you can interchange the images with whatever you would like, and even get this working from home.

Getting the Applet "Bigger" in Eclipse

You'll notice when you run this program in Eclipse, the applet is still the normal 200 x 200 pixels... rather small. Do the following to get the default display a bit larger...
  1. Make sure you have the applet working
  2. Then, instead of clicking the "Run" button like we normally do...
  3. Click the drop-down menu to the right of the run button, and select Run Configurations....
  4. In the menu that appears, click the (x) = Parameters Tab.
  5. In that window, you'll see a Width: and a Height: field.
  6. They are currently set to 200 each (the default). Change them to 700 (for Width) and 500 (for Height).
  7. Click Apply and then Run.

Images Used: