Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Applet max resize limit

Status
Not open for further replies.

MRA

Programmer
Jun 5, 2000
1
IN
Hi All,

The scenario
---------------
An applet to be displayed in a browser window needs to be resized depending on certain logic. Moreover the resize() method is not to be used(since the applet code is not to be touched). That leaves me with the option of changing the HEIGHT and WIDTH attribs in the APPLET tag. The applet is reasonably maximized by increasing the HEIGHT and WIDTH attribs.

The Problem
---------------
After increasing the size of the applet above a certain upper limit, both the browsers, IE and Netscape, fail to display the applet. This upper limit varies from time to time. Java console in IE shows an error 'com.ms.com.ComFailException: (0x80004005) Unspecified error' and Java console in Netscape shows 'java.lang.OutOfMemoryError'. This error is thrown at the line in applet code which is
Code:
SomeImage = createImage(width,height)
where width and height are populated from WIDTH and HEIGTH attribs of the applet tag.
The appletviewer however doesnt throw an error at the upper limit though it doesnt display the complete applet (probably due to the big values of HEIGHT and WIDTH).

Question
----------
Is the visibility/display of the applet dependent on memory availabke to the JVM in the browser?(seems so from Netscape message). If so, can this be increased? (other solutions to the above problem are more than welcome)

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top