private void btn_eliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_eliminarActionPerformed
        final int row = this.table_ticket.getSelectedRow();
        if (row >= 0) {
            final Ticket tic = this.tableTicketModel.getTicket(row);
            int i = JOptionPane.showConfirmDialog(this, "¿Desea eliminar el ticket: " +tic.getTicket() + "?", "Eliminar registro", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
            if (i == 0) {
                this.progress_bar.setVisible(true);
                new Thread(new Runnable() {
                    @Override
                    public void run() {
                        try {
                            tableTicketModel.eliminarTicket(tic, row);
                            actualizarTabla();
                        } catch (SQLException ex) {
                            JOptionPane.showMessageDialog(null, "Ha ocurrido un error , el registro no se pudo eliminar.");
                        }
                        SwingUtilities.invokeLater(new Runnable() {
                            public void run() {
                                progress_bar.setVisible(false);
                            }
                        });
                    }
                }).start();
            }
        }else{
            JOptionPane.showMessageDialog(null, "Seleccione el ticket a eliminar");
        }


    }//GEN-LAST:event_btn_eliminarActionPerformed