} else {
4
JOptionPane.showMessageDialog(null, "The book
is in the library", "Error",
JOptionPane.ERROR_MESSAGE);
}
}
};
runner.start();
} //if there is a missing data, then display
Message Dialog
else {
JOptionPane.showMessageDialog(null, "Please,
complete the information", "Warning",
JOptionPane.WARNING_MESSAGE);
}
}
});
//for adding the action listener for the button
to dispose the frame
OKButton.addActionListener(new
ActionListener() {
public void actionPerformed(ActionEvent
ae) {
dispose();
Do'stlaringiz bilan baham: |