fan类java_AnalogFan 版本2:满分 15 分 修改 1 中Fan 类,让其继承 JPanel 并且把 color属性设 Java Develop 238万源代码下载- www.pud...

详细说明:版本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:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值