Trying to stop swingworker
问题 I have a custom JDialog that pops up when my SwingWorker thread fires up. The dialog just has a JProgressbar and a Button (cancel button). I am trying to figure out how to cancel my SwingWorker, but am having no luck. I think I am on the right path though. I wrote a cancel method, now I just need to figure out how to call it when the button is pushed. Code is below... btn_Cancel.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { //trying to access