|
-
Oct 23rd, 2008, 10:10 PM
#1
Thread Starter
New Member
[RESOLVED] ask for help!
I'm a beginner of java.
and next week is the mids
I want to know how to solve this problem
Write a graphics class RandomTriangle that define a triangle using the GeneralPath class. The x and y coordinates of each of the 3 points of the triangle are generated at random (but should still be within the window frame and should be dependent on the window size in case the window gets resized). The triangle is filled with a random color.
Hint: to generate a random color, generate 3 numbers at random between 0 and 255 and use them to define the color.
Note that each time you resize the window, a new triangle is defined
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|