public void valueChanged(final long bid) { super.valueChanged(bid); SwingUtilities.invokeLater( new Runnable() { public void run() { try { for (Iterator it = components.iterator(); it.hasNext(); ) { JCMAdmin cmAdmin = (JCMAdmin) it.next(); Bundle[] bl = bc.getBundles(); for (int i = 0; i < bl.length; i++) { if (bundleSelModel.isSelected(bl[i].getBundleId())) { cmAdmin.setBundle(bl[i]); } } } } catch (Exception e) { e.printStackTrace(); } } }); }
public void disposeJComponent(JComponent comp) { JCMAdmin cmAdmin = (JCMAdmin) comp; cmAdmin.stop(); super.disposeJComponent(comp); }