import java.awt.*;
import javax.swing.*;
class ContenPaneEx extends JFrame
{
public ContenPaneEx(){
setTitle("ContentPane과 JFrame");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container contentPane =getContentPane();
contentPane.setBackground(Color.ORANGE);
contentPane.setLayout(new FlowLayout());
contentPane.add(new JButton("OK"));
contentPane.add(new JButton("Cancel"));
contentPane.add(new JButton("Ignore"));
setSize(300,150);
setVisible(true);
}
}
class Main{
public static void main(String[] args) {
new ContentPaneEx();
}
}
interesting!!!!
숙제를 하다니 정말 대단한걸.