• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Applet size issue in JRE 1.5.0_15?

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
What's a year in metric? Do you know this metric stuff tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic