Solved

Set applet's width to browser's width

Posted on 2006-11-06
7
311 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
Comment Utility
You'd need to use JavaScript for that
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
0
 
LVL 92

Accepted Solution

by:
objects earned 50 total points
Comment Utility
try width 100%
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:integrosys
Comment Utility
>> try width 100%

Isn't width specified in pixels?
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
can be either
0
 
LVL 3

Expert Comment

by:ForceRs
Comment Utility
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
Comment Utility
Thanks. The solution from objects works for me. Somehow, CEHJ's solution doesn't seem to work.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
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 how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now