Resizing an applet


#1

Hi,
I am deploying a JGO application as an applet.
I want the applet to resize as the browser window resizes so that it fills the entire browser window.
I have javascript calling the setSize(x,y) method on the applet successfully - but i am unsure how to implement the setSize method on the applet.
My code is below. The applet remains the original size however.
Can you see what i am doing wrong ?
thanks a lot.
public
class ChartingApplet extends JApplet implements Runnable {

public void setSize(int width, int height) {
resize(width, height);
_myView.resize(width, height);
getContentPane().resize(width, height);
validate();
}
}


#2

I’m not sure I understand your situation, but if you are running JavaScript code on the client, can’t you just resize the applet directly, rather than calling Java code in the applet?
I haven’t actually tried this with applets, but I would think that setting the width/height of the applet’s style should work.