General discussion

Locked

resizing an applet window (within a HTML

By excelquestion ·
using the applet tages for a java applet i defined an applet window with width and height, expecting to be able to resize those numbers from within the applet, however this was not the case. Neither the resize(x,y) nor the setSize(x,y) methods wouldresize the gray area designated by the browser to run the applet, rather it would only limit the area on that window that I was able to draw to the screen. Is there anyway to properly resize this applet window from within the applet?? thanks so much:-)

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

resizing an applet window (within a HTML

by flan In reply to resizing an applet window ...

once you've set the size of an applet it's pretty much stuck that way, cuz it'll load what ever the inital dimensions are. maybe if you have the previous page (which calls the applet function) to have a user interface where the user can define parameters of the applet, and just resize it from there that would work, (but you'd just be opening another applet, not using the same one over.

or you create an applet with canvas. basically have a one big applet window and have a paintable area in the applet. sort of like an applet in an applet

Collapse -

resizing an applet window (within a HTML

by excelquestion In reply to resizing an applet window ...

Poster rated this answer

Collapse -

resizing an applet window (within a HTML

by keith.hall1 In reply to resizing an applet window ...

I know your asking if you can resize it from within the applet, and as the previous correspondent wrote, thats impossible as far as I know. The best workaround would be to call the function to resize applet from within Javascript within your browserif your page is set up to do that, e.g. applet has an id=myApplet, and you have a public function within the applet called appletResize(int x ,int y) then use a Javascript function
setAppletSize(x,y){
document.myApplet.appletResize(x,y);
document.myApplet.width=x;
document.myApplet.height=y;
}
somewhere in your HTML.

Regards

Keith Hall

Collapse -

resizing an applet window (within a HTML

by excelquestion In reply to resizing an applet window ...

Poster rated this answer

Collapse -

resizing an applet window (within a HTML

by excelquestion In reply to resizing an applet window ...

This question was closed by the author

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums