private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        try {
            selectedTenant.setName(jTextField2.getText());
            selectedTenant.setAddress(jTextField3.getText());
            selectedTenant.setTel(jTextField4.getText());
            selectedTenant.setRoom((Room) jComboBox1.getSelectedItem());
            selectedTenant.setRentDate(jTextField1.getText());
            selectedTenant.setPayStatus(jTextField6.getText());
            selectedTenant.getRoom().setStatus("no");
            if (selectedTenant.getId() != null && selectedTenant.getId() != 0) {
                tenantJpaController.edit(selectedTenant);
                roomJpaController.edit(selectedTenant.getRoom());
                tenantTableModel.fireTableDataChanged();
            } else {
                tenantJpaController.create(selectedTenant);
                roomJpaController.edit(selectedTenant.getRoom());
                tenantTableModel.tenants.add(selectedTenant);
                tenantTableModel.fireTableDataChanged();
                System.out.println(selectedTenant.getId());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        this.parent.getRoomView1().refresh();
        this.parent.getBookingViews1().refresh();
        this.parent.getTenantViews1().refresh();
        setEnabledForm(false);
    }//GEN-LAST:event_jButton1ActionPerformed