文件名称:draws 10 random filled shapes in random positions.
文件大小:1KB
文件格式:ZIP
更新时间:2017-12-01 14:33:52
paint
Create a program that draws 10 random filled shapes in random positions. Method paintComponent should contain a loop that iterates 10 times. In each iteration, the loop should determine whether to draw a rectangle or an oval, and choose coordinates and dimensions at random. The coordinates should be chosen based on the panel's width and height. Lengths of sides should be limited to half the width or height of the window.
【文件预览】:
lab1
----DrawShapesTest.java(432B)
----DrawShapes.java(1KB)