• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

setBounds & setSize bug?

 
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 a strange problem with my applet, it sometimes does not fully display (Only display half or 1/3 of its height).

I tried to add setBounds and setSize calls, I even called to resize using Javascript but the applet still does not display full height. It's strange that if I manually resize the browser window containing the applet, then it displays correctly.

I use JRE_1.5.0_15.

Please advice?

Thanks
 
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 applet size can't be affected by any of the methods you describe. It is determined by the width and height attributes of the applet tags.

What do you mean by "does not fully display" - is there an empty area where the lower half of the applet should be, or is the applet's area actually smaller than what you specify in the height attribute?
 
Chinh Tran Nam
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ulf,

Thanks for your answer.


The applet size can't be affected by any of the methods you describe. It is determined by the width and height attributes of the applet tags.



Both width and height attributes are set to "100%".


What do you mean by "does not fully display" - is there an empty area where the lower half of the applet should be, or is the applet's area actually smaller than what you specify in the height attribute?



"does not fully display" means it only displayed the upper half of the applet, the lower half appeared to be blank (in gray, actually).

Please advice?

Thanks,
Chinh
 
Chinh Tran Nam
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When that issue happened, I've even tried to call applet resize(width, height) from javascript but the applet still did not display all. It only displayed correctly when I dragged the mouse to resize the browser window.

Thanks,
Chinh
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Both width and height attributes are set to "100%".


Width and height are given in pixels, not percentages.

I've even tried to call applet resize(width, height) from javascript but the applet still did not display all.


An applet can't be resized, not from within the Java code, nor from the outside using JavaScript.
[ March 19, 2008: Message edited by: Ulf Dittmer ]
 
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic