It would be good to show a wait cursor on the screen for long jobs with the trigger done through the Swing screen component.
It would be great to provide this feature with an interface that overrides the ActionListener.
In the software engineering world, Factory Design Pattern is used to encapsulate object creation. Generics which is another useful concept, converts runtime typecast errors to compile-time errors. Besides these benefits, the Factory Design Pattern and Generics provide a simple approach to managing software problems. With the combination of these two concepts, we can multiply the benefits.
For the following types of work Generics with Factory Design Pattern may be used.