Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Java - Simple Applet Application

xJavaLover
xJavaLover 


Design an applet type of application to draw a colonial or split level house with a tree decorated with hanging eggs and one bunny at the entrance door (I believe the bunny can be a simple small image). The following must be done in separate methods which will be called by paint method: drawHouseOutline(Graphics page) drawRoof(Graphics page) drawWindows(Graphics page) drawDoor(Graphics page) drawTree(Graphics page) drawTreeDecorations(Graphics page) drawFence(Graphics page) In addition, you must include at least one recursive method of your choice that will be called in one of those methods. I have drawn the house, the windows, the roof, the door. I need these other things done: drawTree (draw a tree) drawTreeDecorations(draw easter egg decorations on the tree) drawFence (Draw around front or entire house) EDIT drawDoor (to draw an easter bunny at the door, maybe use a small image of a bunny?) EDIT or CREATE one of these methods with recursion. Attachments Tags Clarifications

Answers

Java - Easter Applet - Solution

dickersonka
dickersonka 



Attached is the solution to the Java - Easter Applet assignment. Included are the above methods with recursion. Attachments
EasterApplet.zip (68 K) Download
Preview
} public void drawHouseOutline(Graphics page) { page.setColor (new Color(152,4,251)); //House page.fillRect (100,250,400,200); } public void drawRoof(Graphics page) { page.setColor(new Color(192,192,192)); //House Roof int x[] = {98,300,501}; int y[] = {250,130,250}; page.fillPolygon(x,y,3); } public

Preview

Screenshots
Screenshot
Purchase Answer