• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Applet size issue in JRE 1.5.0_15?

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?

Posts: 43016
  • 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.
Tongue wrestling. It's not what you think. And here, take this tiny ad. You'll need it.
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic