java - Displaying frames in an applet -


i writing java swing application. consists of graphing tool added library. works fine desktop application. however, i'm trying convert application applet , graphing frame won't come on browser. code invoking graphing frame is:

double x[] = {1,2,3,4,5,6,7,8}; double y[] = {1,0,1,0,1,0,1,0};         plot.addlineplot("plot", color.blue, x, y);     jframe frame = new jframe("a plot panel"); frame.setsize(1400, 730); frame.setcontentpane(plot); frame.setdefaultcloseoperation(jframe.exit_on_close); frame.setvisible(true); 

i typed same lines in applet won't work in browser. how make work in applet?

extend applet class, add gui elements accordingly, can not show frame in browser applet provided main container frame or jframe in desktop application.

example:-

    public class myapplet extends applet{     public void paint(graphics g){             /* applet code here                */             g.setcolor(color.red);             g.drawrect(20,20,200,180);         }     } 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -