// update a manager's profile private void btnUpdateActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnUpdateActionPerformed // TODO add your handling code here: JTextComponent[] tcp = {txtId, txtPName, txtBorn}; if (!Validator.validateComponents(tcp)) { return; } String id = txtId.getText(); String name = txtPName.getText(); String born = txtBorn.getText(); String gender = "Male"; boolean male = true; if (radFemale.isSelected()) { male = false; gender = "Female"; } String star = "0"; if (isStar.isSelected()) { star = "1"; } String director = "0"; if (isDirector.isSelected()) { director = "1"; } String day = String.valueOf(jxDate.getDate().getDay()); String month = String.valueOf(jxDate.getDate().getMonth() + 1); String year = String.valueOf(jxDate.getDate().getYear() + 1900); String day1 = day + "-" + month; if (PersonController.update(selectedID, name, gender, day1, year, born, director, star)) { new CustomMessageDialog( null, true, "Done!", "Updated sucessfully!", CustomMessageDialog.DONE); AdminPersonList.reloadTable(); } } // GEN-LAST:event_btnUpdateActionPerformed