private void CheckOutAction() { String confirmMsg = member.getFirstName() + ":\nYou will checkout the book " + pub.getTitle() + ".\nPlease confirm!"; int confirm = MessageBox.show( checkoutStage, confirmMsg, "Question dialog", MessageBox.ICON_QUESTION | MessageBox.YES | MessageBox.NO | MessageBox.DEFAULT_BUTTON2); // proceed if confirmed if (confirm == MessageBox.YES) { setLibraryMember(memberID.getText()); if (saveCheckOutRecord()) { MessageBox.show( checkoutStage, "Check out successfully!", "Success Infomation", MessageBox.ICON_INFORMATION | MessageBox.OK | MessageBox.DEFAULT_BUTTON2); } } }