画笔
package com.zhang.Study.画笔; import java.awt.*; public class PanitUse { public static void main(String[] args) { new Mypaint().LoadFrame(); } } class Mypaint extends Frame{ public void LoadFrame(){ setBounds(400,400,400,400); setVisible(true); } //画笔 @Override public void paint(Graphics g) { g.setColor(Color.red);//设置画笔颜色 // g.drawOval(100,100,100,100);//画一个空心圆 g.drawOval(100,100,100,100);//画一个实心圆 g.setColor(Color.green);//重新设置画笔颜色 g.draw3DRect(100,200,100,100,true);//画一个3d矩形 } }