Java applet setSize not accurate, window too large -


i have java applet j trying to set 480, 800 using setsize window comes 487,850 reason. here code set.

public void init() {         setsize(480,800);         setbackground(color.blue);         setfocusable(true);         addmouselistener(this);         addkeylistener(this);         frame frame = (frame) this.getparent().getparent();         frame.settitle("swingball");         try {          base = getdocumentbase();         } catch (exception e) {         // todo: handle exception         } } 

there no other mention of setting size anywhere else in code, idea why happening?

you don't set size of applet in applet itself, , trying have no effect, you're finding out. if want specify size of applet, in html code calls applet.

as aside, //todo: handle exception telling important, shouldn't leave catch block empty.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -