paint方法
来源:互联网 发布:如何通过淘宝试用 编辑:程序博客网 时间:2024/05/02 01:03
import java.awt.*;public class TestPaint {public static void main(String[] args) {new PaintFrame().launchFrame();}}class PaintFrame extends Frame {public void launchFrame(){setBounds(400,400,400,400);setVisible(true);}public void paint(Graphics g) {<span style="white-space:pre"></span>//重写paint方法,这个方法不需要调用,是自动调用的方法,例如将窗口最小化后在打开,就重新调用了Color c = g.getColor();<span style="white-space:pre"></span>//将Graphics当做是画笔g.setColor(Color.red);g.fillRect(40,40,40,40);g.setColor(Color.blue);g.drawRect(100,100,100,100);g.setColor(c);}}
0 0
- paint方法
- paint方法
- Paint方法
- Paint方法setXfermode
- Paint方法setXfermode
- Paint方法setXfermode
- Paint之setAlpha方法
- Paint方法setXfermode
- paint.setstrokewidth方法
- Paint常用方法总结
- Paint方法setXfermode
- Paint类常用方法
- Android paint方法介绍
- paint类方法介绍
- Paint类常用方法
- Paint方法setXfermode
- Paint 的set方法
- paint 中的方法
- centos7 apache 配置负载均衡
- 如何查看电脑的配置
- uva 1267
- NOIP 2006 金明的预算
- 求数组中出现次数超过一半的元素
- paint方法
- OSI七层模型详解
- 离婚女人的离婚心得
- Your version of the Windows SDK is earlier than 6.0 Try setting the 'WINVER' and '_WIN32_WINNT' defi
- CentOS6.5下部署samba企业级文件服务器实战
- 字符串最小周期
- jpgraph中文乱码处理
- 线程调度器
- 结婚