• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make applet fit any screen

 
Rosie Vogel
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is probably a ridiculously simple problem but I can't find the answer. I have made an applet and I want it to automatically adjust to the size of the user's screen. Can this be done?
 
Jennifer Wallace
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rosie,
I am not an expert on applets. But see if this would be a solution.
<applet code=example.class width=100% height=100>
</applet>
Coding width as 100% should make the width of the applet as wide as the window size.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jennifer's idea works well for me with Internet Explorer 6 and Netscape 4.
 
Rakesh Ray
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
before opening the applet you can check the screen size using javascript functions and use that to generate the applet tag...
 
Rosie Vogel
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oddly enough, '100%' works well in the browser but the jdk's appletviewer won't even start up if you use it. Oh well, you can't have everything. Thanks, guys.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic