日期:2014-05-18 浏览次数:20744 次
public class Test extends JFrame{
public static void main(String[] args) {
Test test=new Test();
test.setSize(1000, 1000);
test.add(new T(1));
test.show();
}
}
class T extends JLabel {
int i;
public T(int i) {
this.i=i;
}
@Override
public void paint(Graphics g) {
super.paint(g);
g.drawLine(30, 20, 70, 20);
g.drawArc(20, 20, 20, 20, 90,90);
g.drawLine(20, 30, 20, 70);
g.drawLine(30, 80, 70, 80);
g.drawLine(80, 30, 80, 70);
}
}