I\'ve a JFrame subclass that manage my UI and call a method of Item Object to import items in my DB:
public TestGUI() throws IOException { initComponents();
Check out SwingWorker and SwingUtilities in case you use Swing. They contain helper threading APIs
Swing