Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

resize applet

 
mellowman
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 ?
 
Dirk Schreckmann
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!
 
Clarence Kirby
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic