java - how to get an applet value in json as output -


i have applet code displays name in applet browser. trying name json output inside same applet. below code,

public class appletclass extends applet{      public void paint(graphics g){       string name = "myname";       jsonobject obj=new jsonobject(); // assigning json       obj.put("myname",name);    }    g.drawstring(name,40,20); } 

when excute getting name in browser there no response json , not sure how it. suggest idea solve this.

in html file create function accepts parameter, in applet code pass json object function.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -