java - Swing Worker Thread Says There is no Process() Method In Super Class -


i trying implement swingworker thread in updating gui. understand process() method executed edt, if need update gui, should place update code within method.

however, when try override process() method, error, method not implement method supertype.

please missing or process() method no longer exist?

class swingworkerthread extends swingworker<string, string> {      @override     protected string doinbackground() throws exception {         string pub = "a";          (int = 0; < 20; i++) {             pub = string.valueof(i);              publish(pub);         }          return pub;     }      @override     protected string process(string h) {         system.out.println(pub);         mainframe.textarea.settext(pub);         return null;     }      @override     protected void done() {         string status;         status = get();         try {              system.out.println("done");          } catch (exception ex) {             system.out.println("error: " + ex);         }     }  } 

there no string process(string) method on swingworker. there void process(list<v>), want.

(that still won't fix fact pub local variable , not visible in method.)


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -