Kod: Zaznacz cały
class SendingToSSHWorker extends SwingWorker<String, Void> {
protected String doInBackground() {
try {
//here will be function to gather data to send to SSH host
Thread.sleep(1000);
} catch(Exception lol) {
System.out.println(lol);
}
return "whatever"; // I wanted to use void or int but it seems basic types can't be used. I was like WTF???
}
@Override
protected void done() {
// 2 functions will be here. Sending to SSH host one, and presenting one.
TreeTools.addToTree("nowy", "new content testowy", GUI.sendToSSHTree);
}
}

Help anyone?
-----
edit: rozwiazalem

1. Gui to nazwa klasy a nie jej instancja - tam gdzie jest inicjowane GUI po prostu przypisalem instancje GUI do wlasnostworzonej klasy "SuperGlobals" a potem w innym pliku zimportowalem klase "SuperGlobals" i mialem instancje GUI pod reka
2. elementy GUI sa private. Co prawda mozna je dostac za pomoca getComponents lub GetComponentAt ale mi sie nie chcialo bawic w przechodzenie po calej liscie i szukanie tego czego chce. Po prostu dalem to konkretne JTree jako protected a nie private i tyle...
to teraz pozostaje zrobic jak zrobic zeby byly w firefoxie polskie literki
