+ /**
+ * Remove a progress bar for the given id if it exists. Subsequent calls do
+ * nothing.
+ *
+ * @param id
+ * id of the progress bar to be removed
+ */
+ @Override
+ public void removeProgressBar(final long id)
+ {
+ JPanel progressPanel = progressBars.remove(id);
+ if (progressPanel == null)
+ return;
+ progressBarHandlers.remove(id);
+ Runnable r = () -> {
+ removeRow(progressPanel);
+ refreshLayout();
+ };
+ if (SwingUtilities.isEventDispatchThread())
+ r.run();
+ else
+ SwingUtilities.invokeLater(r);