private void jButtonRemoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRemoveActionPerformed
        DefaultTableModel model = (DefaultTableModel) SupplierTable.getModel();
        if (SupplierTable.getSelectedRow() == -1) {
            jLashow.setText(model.getRowCount() + "");
            if (SupplierTable.getRowCount() == 0) {
                JOptionPane.showMessageDialog(this, "Suppliers table is empty.");
            } else {
                JOptionPane.showMessageDialog(this, "Select the supplier please.");
            }
    }//GEN-LAST:event_jButtonRemoveActionPerformed
        else {
            try {
                int confirm = JOptionPane.showConfirmDialog(this, "Are you sure you want to remove supplier from the list?");
                if (confirm == 0) {
                    if (removeSupplier()) {
                        model.removeRow(SupplierTable.getSelectedRow());
                        loadData();
                    }
                }
            } catch (ClassNotFoundException | SQLException e) {
                Logger.getLogger(OfficeWorkerGUI.class.getName()).log(Level.SEVERE, null, e);
            }
        }



    }