Page 379 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 379
인천전자마이스터고 전자회로설계과
(new GpioExample()).gpioControl();
}catch (InterruptedException e){
e.printStackTrace();
}
}
else
{
txt.setText("");
JOptionPane.showMessageDialog(this, "인증번호가 다릅니다.");
}
}
public static void main(String[] args)
{
new MainFrame();
}
private class PopUpKeyboard extends JDialog implements ActionListener
{
private JTextField txt;
public PopUpKeyboard(JTextField txt)
{
this.setPreferredSize(new Dimension(280,140));
this.txt = txt;
setLayout(new GridLayout(4,3));
for(int i = 1;i<=12;i++)createButton(Integer.toString(i));
pack();
}
private void createButton(String label)
{
String l = null;
if(label.equals("10"))l="X";
else if(label.equals("11"))l="0";
else if(label.equals("12"))l="ok";
- 372 -