import java.awt.*;
public class MyFrame extends Frame {
@Override
public void print(Graphics g) {
g.setColor(Color.BLUE);
g.fillOval(50, 50, 30, 30);
}
public void lanuchFrame() {
setBounds(300,300,200,200);
this.setVisible(true);
}
public static void main(String[] args) {
new MyFrame().lanuchFrame();
}
}
1、这程序为什么窗口内的圆显示不出来?
2、哪位帅哥能告诉下,我这用按JAVA格式写的,怎么显示出来会"变形"?
------解决方案--------------------
public void paint(Graphics g)
not 'print'