Question: I need help with this short practice project. I want the outcome to come out like the pictures plus it has to be random. Description

 I need help with this short practice project. I want theoutcome to come out like the pictures plus it has to be

I need help with this short practice project. I want the outcome to come out like the pictures plus it has to be random.

Description Write a class Forest that includes a method paintTree ). The header of the method should be: public void paintTree (Graphic g, int x, int y, Color treeColor) The method paints a single tree having the color treeColor and located at coordinates x and y. The exact shape of the tree is up to you. Review the projects in the HOF for different design options Repeatedly invoke method paintTree to draw a forest. Forest should have at least 5 trees. The forest should consist of randomly located trees each of a random color. Use an event to display a forest. Pressing the button should replace the forest with a new different one. To help you to start working on the project and learn new layout manager BorderLayout, I I suggest using this project as a starting point. Description Write a class Forest that includes a method paintTree ). The header of the method should be: public void paintTree (Graphic g, int x, int y, Color treeColor) The method paints a single tree having the color treeColor and located at coordinates x and y. The exact shape of the tree is up to you. Review the projects in the HOF for different design options Repeatedly invoke method paintTree to draw a forest. Forest should have at least 5 trees. The forest should consist of randomly located trees each of a random color. Use an event to display a forest. Pressing the button should replace the forest with a new different one. To help you to start working on the project and learn new layout manager BorderLayout, I I suggest using this project as a starting point

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!