Help with a program to make a landscape picture
does anyone know the code that would make a random landscape with a black rectangle background 600 pixels wide by 400 pixels tall. with randomly placed, random sized and randomly colored rectangles aligned on the bottom of the black rectangle.
If you have the code please post it here. it would be very much appreciated. thanks.
Re: Help with a program to make a landscape picture
See the following tutorial:
Lesson: Working with Images (The Java™ Tutorials > 2D Graphics)
You'll need to create an Image (see Creating and Drawing to an Image), get its graphics, and draw to it, using something like Math.random() to generate random sizes and colors.