• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAVA applet "display area" fix - how to do it?

 
Ronald Vermeij
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I am working my way through GUI programming and find myself frustrated about not being able to fix a screens dimensions (yet)

So far I have figured out that:
1. "The screensize" of an applet can be regulated from the HTML code that launches the applet. The parameter width and height determine how big the "applet screen area" is going to be "on screen in the browser" of the client. (see example below)


Question:
How can I determine/fix the surface_area of an applet (from inside the applet via code)
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't change the size in code, but you can call getSize() to find out what it is.
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't mind a somewhat hackish solution, then it's possible to do this from within JavaScript code .

And since it is possible to access the web page's DOM through the Common DOM API, it should be possible that the applet resizes itself that way. I'm not sure if you can call JavaScript this way, but it should be possible to access and alter the width/height properties mentioned in the article above.
 
Rob Spoor
Sheriff
Pie
Posts: 20610
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our Applet forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic