详细说明:版本2:满分 15 分
修改版本 1 中Fan 类,让其继承 JPanel 类,并且把 color属性设置为 Color类型,默认
属性为 red。随机产生 radius ,取值范围为 1-5;随机产生颜色,取值范围为 red、blue 、yellow 、
green、orange ;根据 color、radius 属性值绘制风扇。运行如下图:
版本3:满分 20 分
让版本 2 中的风扇转起来。创建一个 FanControl 类包含以下内容:Start 、Stop 、Reverse
按钮,用于开启、关闭、反转控制;一个滚动条控制速度。运行示例如下:-Version 2: 15 points out of a modified version of a class in the Fan, let inherits JPanel class, and the color attribute is set to Color type, default attribute is red. Randomly generated radius, in the range of 1-5 randomly generated color range red, blue, yellow, green, orange according to color, radius attribute values plotted fan. Run the following diagram: Version 3: Version 2 out of 20 points for the fans turn up. Create a FanControl class contains the following: Start, Stop, Reverse buttons for opening, closing and reverse control a scroll bar control speed. To run the sample as follows: