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
Post a Comment