• 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

resize applet

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi!
in order to avoid the grey box while an applet is loading i tried to load it with width and height = 1.
the start() method calls a javascript function, which tries to resize the applet by document.myApplet.height = 222 ...
this works with ie but it doesn't with netscape.
the error message says :"can't access java field width"
does anybody know how to solve this problem ?
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mellowman,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I looked up what you did in Javascript book and it looks like it should work. Maybe you should try using a Component method to resize the applet instead of setting a javascript applet property. Try this?:
document.appletName.setSize(width, height) ;
The javascript book that I'm reading says that either way should work.
 
Clarence Kirby
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW, in the applet tag you should have a name paramater:
<applet code="myApplet.class" name="myApplet" width="1" height="1">
</applet>
That might be what's ailing your applet.
 
Crusading Chameleon likes the size of this ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic