I want execute ExampleSwingWorker1 from Main GUI. Main GUI class compile and doing some jFrame and DB operations and show main app screen to user. And I have another class for store all of my Swingworkers.
public class WorkerClass {
public class ExampleSwingWorker1 extends SwingWorker<Void, Void> {
protected Void doInBackground() throws Exception {
process1();
process2();
process3();
process4();
process5();
process6();
return null;
}
public void done() {
Toolkit.getDefaultToolkit().beep();
}
}
}
Button Action in MainGui Class;
private void buttonRefreshActionPerformed(java.awt.event.ActionEvent evt) {
WorkerClass.ExampleSwingWorker1 trying = new WorkerClass.ExampleSwingWorker1();
}
I tried with the above methods for instantiating ExampleSwingWorker1 but it's not possible. But this Oracle Link offer this method for reach inner class.