This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Applets and the fly likes How do I Dynamically change Applet size. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Applets
Reply Bookmark "How do I Dynamically change Applet size." Watch "How do I Dynamically change Applet size." New topic
Author

How do I Dynamically change Applet size.

mohana konakanchi
Ranch Hand

Joined: May 16, 2001
Posts: 67
Hi
I want to display applet whose size will vary depending on screen resolution used by the comupter.
Does any body tell me how I can get Screen resolution from JavaScript. so that I can change my applet display size.
thanks in advance
Mohana
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

well, the best you could do is specify the WIDTH and HEIGHT
in terms of % and not just an int value. Then again it will
be % of the browser WIDTH and HEIGHT.
Also, I have read that its not a very good practice to set
these for the applet.
For what its worth.
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Rakesh Ray
Ranch Hand

Joined: Jul 25, 2001
Posts: 51
<html>
<body>
<script type="text/javascript">
document.write("SCREEN RESOLUTION: ")
document.write(screen.width + "*")
document.write(screen.height + "<br>")
document.write("AVAILABLE VIEW AREA: ")
document.write(window.screen.availWidth + "*")
document.write(window.screen.availHeight + "<br>")
document.write("COLOR DEPTH: ")
document.write(window.screen.colorDepth + "<br>")
</script>
</body>
</html>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I Dynamically change Applet size.
 
Similar Threads
How to set screen resolution
programmitically controlling the resolution
jApplet Problem!!!
GUI and screen resolution
Windows/Mac screen resolution change