private void BTSalvarActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_BTSalvarActionPerformed if (!TFNomecliente.getText().isEmpty()) { if (status == 1) { SalvaCliente(); } else if (status == 2) { AlteraCliente(); } jtableCliente.PreencherJtableCliente(comanda, id_mesa); } } // GEN-LAST:event_BTSalvarActionPerformed
/** Creates new form DLCadCliComanda */ public DLCadCliComanda( java.awt.Frame parent, boolean modal, String comanda, String id_com_clie, int status, String nomeCliente, String id_mesa, IFComanda jtableCliente) { super(parent, modal); initComponents(); // redimenciona o lookandFeeld de acordo com o selecionado SwingUtilities.updateComponentTreeUI(this); this.pack(); this.comanda = comanda; this.id_com_clie = id_com_clie; this.status = status; this.nomeCliente = nomeCliente; this.id_mesa = id_mesa; this.jtableCliente = jtableCliente; if (status == 2) { TFNomecliente.setText(nomeCliente); } }