±Û¾´ÀÌ :¿Àµî¿î 2000³â 1¿ù 23ÀÏ 04:36:21
//¾Æ·¡ ¼Ò½ºÁ» ºÁÁÖ¼¼¿ä
//½ÇÇàÇϸé ÇÁ·¹ÀӾȿ¡ ¹öÆ°ÀÌ Çϳª ´Þ¶û º¸ÀÔ´Ï´Ù.
//MyButtonÀ̶õ Ŭ·¡½º´Â ButtonŬ·¡½º¸¦ »ó¼Ó¹Þ¾Æ¼
//¸¸µé¾ú½À´Ï´Ù.
//±×·±µ¥ JButtonÀ» »ó¼Ó¹Þ¾Æ¼ ¸¸µé¸é ¹öÆ°ÀÌ º¸ÀÌÁú ¾ÊÄï¿ä.
//¿Ö ±×·²±î¿ä
//Ãʺ¸¶ó¼ ³Ñ ´ä´äÇϱº¿ä
//³Ñ ½¬¿î°É ¸ô¶ó¼ Á˼ÛÇÕ´Ï´Ù.
//±×·³ ´äº¯ ºÎŹµå¸±²²¿ä
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class Exam extends JFrame{
JPanel p;
MyButton mb;
public Exam(){
super("Hello");
getContentPane().setLayout(null);
setSize(800, 600);
p = new JPanel();
mb = new MyButton();
p.setBounds(30, 30, 300, 500);
mb.setBounds(30, 30, 80, 20);
getContentPane().add(p);
getContentPane().add(mb);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent we){
System.exit(0);
}
});
show();
}
public static void main(String[] arg){
Exam exam = new Exam();
}
class MyButton extends Button{
public MyButton(){
super("´·¯Áà");
}
}
}