Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet size issue in JRE 1.5.0_15?

 
Chinh Tran Nam
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have an applet with both WIDTH and HEIGHT = 100% as parameters. It works OK in previous JRE versions.
But when I upgraded to JRE 1.5.0_15, I saw strange issue: The applet height sometimes did not stretch full browser height, it looked as if the applet corrupted. I added some debug code to init() and start() events the applet and found that the getBounds().height returned different values; sometimes correct value (browser's height), sometimes not.

Anyone encountered the same issue? Do you have any solution or advice?

Thanks,
Chinh
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The width and height attributes take pixels, not percentages. If you want to have the applet stretch for the full screen size you'll need to run some JavaScript code that determines those sizes, and which then creates an applet tag with the corresponding width and height in pixels.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic