draws 10 random filled shapes in random positions.

时间:2017-12-01 14:33:52
【文件属性】:

文件名称: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)

网友评论

  • 简单明了~~谢谢!
  • 非常简单明了!容易理解!
  • 帮助很大!!学到了很多java 知识点。