[java] dynamic applet sizing

Started by
3 comments, last by laotzu 22 years, 9 months ago
I was just wondering if there was a way to assign the width and height of the applet according to the size of the window when the page was loaded. Thank you, -lao
Advertisement
Have you tried width=x% and height=x% in the applet tag? It works with image tags and tables, so there''s a chance it''d work with applets...
Use java-script, detect the window size then do a document.write to dynamically set the width and height of the applet.
Hi!

First of all; the solution proposed by c_wraith doesn''t work with all browser. If I remember correctly, it only works with Internet Explorer.

Second; bslayerw, could you please show me the java-script code to set the size? We have tried something similiar, but we ran into trouble when the connection was bad. If the java-script was executed before the important Java classes was loaded, the Java applet didn´t get the call from the java-script. We delay the java-script by about half a second. However, this could fail if the connection is really slow.

It would be nice if bslayerw''s solution worked better than our solution:-)

Regards
Johan
I had no clue if my idea''d work... I''m glad you at least had tested it.

This topic is closed to new replies.

Advertisement