Solved

Set applet's width to browser's width

Posted on 2006-11-06
7
314 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
  • 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Checkbox and ListView in Android Layout 4 66
servlet example 11 40
Opening PDF on button click and fill new document 2 38
Convert from a json string array to a Java object 3 32
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

777 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