Page 760 - 3-2
P. 760
txt.addMouseListener(new MouseAdapter()
{
@Override
public void mouseClicked(MouseEvent e)
{
Point p = txt.getLocationOnScreen();
p.y += 30;
keyboard.setLocation(p);
keyboard.setVisible(true);
}
});
setLayout(new FlowLayout());
add(txt);
add(btnOk);
pack();
setVisible(true);
btnOk.addActionListener(this);
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String pw = DbSelect.GetPw();
if(txt.getText().equals(pw))
{
this.setVisible(false);
this.keyboard.setVisible(false);
new SoundOpen();
JOptionPane.showMessageDialog(this, " 인증되었습니다.");
(new SoundOpen()).playSound();
GpioExample.go=1;
System.out.println(GpioExample.state);
try{
(new GpioExample()).gpioControl();
}catch (InterruptedException e){
e.printStackTrace();
}
}
else
{
txt.setText("");
JOptionPane.showMessageDialog(this, " 인증번호가 다릅니다.");
- 760 -