Example #1
0
  private void cmdBuscarActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_cmdBuscarActionPerformed
    GenericoTableModel aModel = (GenericoTableModel) this.tblEnvios.getModel();
    aModel.limpiar();
    this.tblEnvios.addNotify();
    if (txtFecha.getText().trim().length() > 0) {
      SimpleDateFormat formateador = new SimpleDateFormat("dd/MM/yyyy");
      try {
        fechaBusqueda = formateador.parse(txtFecha.getText());
      } catch (Exception e) {
        Icon Icon = null;
        JOptionPane.showMessageDialog(
            this, "La fecha no posee formato correcto", "Envios", JOptionPane.ERROR_MESSAGE, Icon);
      }
    }

    presenter.getBuscarEnvioHandler().stateChanged(new ChangeEvent(this));
  }