Try this
http://www.javaworld.com/javatips/jw-javatip80_p.html
OK, the example is aimed at resizing from the java applet, but you could just as easily get put a textbox on a form and set the form Submit method to call a javascript function to read the values out of the textbox(es) and set the height & width as in the above example