private void jButton1ActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButton1ActionPerformed // TODO add your handling code here: TFID.setText(""); TFName.setText(""); TFSex.setText(""); TFAddress.setText(""); TFTPNumber.setText(""); } // GEN-LAST:event_jButton1ActionPerformed
private void bSearchActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_bSearchActionPerformed ApplicationContext context = new ClassPathXmlApplicationContext("Spring-Module.xml"); PersionDAO persionDAO = (PersionDAO) context.getBean("persionDAO"); Persion persion; persion = persionDAO.findByPersionId(TFID.getText()); TFName.setText(persion.getName()); TFSex.setText(persion.getSex()); TFAddress.setText(persion.getAddress()); TFTPNumber.setText(persion.getTpnum()); } // GEN-LAST:event_bSearchActionPerformed