Graphics Demo Projects
Graphics Demo 2: This example gives you additional ideas about what graphics can be created with Java. Download the following .java file, put it into Eclipse and get it to run. Make the changes as directed below.
1. Using either the Color Schemer Online or ColorPicker.com, make a color of your own and change the middle circle (the yellow one) to your custom color.
2. Draw a second, slightly smaller pacman to the right of the first pacman. Make her face to the left and make her pink.
2. Draw a second, slightly smaller pacman to the right of the first pacman. Make her face to the left and make her pink.
Graphics Demo 3: Finally, here's an example where you can play with lines and text. Download the .java file, put it into Eclipse and get it to run. Make the changes as directed below.
1. When drawing a line, what do the four numbers represent?
2. Make a short red line that intersects the long green line.
3. Make a short red line that is roughly perpendicular to the diagonal "magenta" line.
4. When drawing a rectangle, where on the rectangle is the starting point you provide? Use the images below as a guide to your answer.
2. Make a short red line that intersects the long green line.
3. Make a short red line that is roughly perpendicular to the diagonal "magenta" line.
4. When drawing a rectangle, where on the rectangle is the starting point you provide? Use the images below as a guide to your answer.
5. When drawing strings, where on the string is the starting point you provide?