package alpha;
import java.awt.*;
import java.awt.event.*;
class x extends WindowAdapter {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
}
class MyFrame extends Frame {
public void paint(Graphics g) {
g.drawString("abv",70,70);
g.setColor(new Color(255, 0, 0, 10));
g.fillRect(50, 50, 100, 100);
}
}
class pro {
public static void main(String[] args) {
MyFrame myframe = new MyFrame();
myframe.setBounds(50, 50, 400, 300);
myframe.setTitle("AlphaTest");
myframe.addWindowListener(new x());
myframe.setVisible(true);
}
}
最終更新:2014年04月21日 14:08