need help w/ JFrame and class Graphics2d
Posted on 2006-10-25
I need some help with this assignment, this is a beggining java course im taking online, I just need help setting up the classes, since this is homeowrk you can point me to a good tutorial, or just psuedo code to get me started thanks for the help !
Write a JFrame application that simulates a screen saver. The application should displays randomly generated triangles, draws characters, and draw lines. After drawing 100 of them, the application should clear itself and start drawing lines again. To allow the program to draw continuously, place a call to repaint as the last line in method paint.
Each triangle should be filled with a different color. Use class GeneralPath and method fill of class Graphics2D to draw the triangles in different colors and different sizes.
The characters will be generated are A to Z , 26 characters, and 0 to 9, 10 number-digits. The characters will be draw in different font sizes and colors.
The drawing lines will use method drawLine of class Graphics to generate different lengths and colors.