Page 385 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 385
인천전자마이스터고 전자회로설계과
pi4j
public class ActionExam extends Frame implements ActionListener
{
JButton btn1 = new JButton("대출");
JButton btn2 = new JButton("반납");
MainFrame mf = null;
public ActionExam()
{
super("우산대여기");
this.setLayout(new GridLayout(1,2));
this.add(btn1);
this.add(btn2);
this.setSize(360, 300);
this.setVisible(true);
btn1.addActionListener(this);
btn2.addActionListener(this);
btn1.setFont(new Font("Serif", Font.BOLD, 50));
btn2.setFont(new Font("Serif", Font.BOLD, 50));
GraphicsEnvironment env =GraphicsEnvironment.getLocalGraphicsEnvironment();
this.setMaximizedBounds(env.getMaximumWindowBounds());
this.setExtendedState(this.getExtendedState() | this.MAXIMIZED_BOTH);
this.addWindowListener(new WinExam());
}
- 378 -