Solved

Set applet's width to browser's width

Posted on 2006-11-06
7
316 Views
Last Modified: 2010-03-31
The width of an applet is set via the "width" attribute of the applet tag, which is specified in pixels. I would like the width of the applet to be dynamic, such that it will take up the entire width of the browser's window. When the browser is resized, the applet will resize accordingly. Can this be achived? Thanks.
0
Comment
Question by:integrosys
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 17879536
You'd need to use JavaScript for that
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17879538
0
 
LVL 92

Accepted Solution

by:
objects earned 50 total points
ID: 17879558
try width 100%
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:integrosys
ID: 17879604
>> try width 100%

Isn't width specified in pixels?
0
 
LVL 92

Expert Comment

by:objects
ID: 17879710
can be either
0
 
LVL 3

Expert Comment

by:ForceRs
ID: 17881277
objects is correct (width and height can be %).

To have mozilla browsers honor this, you must reload the page onResize:

<html>
<head>
<script language="JavaScript">
function resizer() {
      if(navigator.appName == 'Netscape') {
            history.go(0);
      } // end if
}
</script>
</head>

<body onResize="resizer();">
Your page's visual content.
</body>
</html>
0
 

Author Comment

by:integrosys
ID: 17888056
Thanks. The solution from objects works for me. Somehow, CEHJ's solution doesn't seem to work.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ejb stateless example 2 43
ejb message driven bean mdb creation steps 2 35
What browser will run Java? 7 126
How to fix  socket closed error 11 28
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question