Solved

applet size in Netscape

Posted on 2001-06-18
6
274 Views
Last Modified: 2010-03-31
Hi,

I try to put my applet in a table for avoiding frames. In IE5 works fine but in Netscape 4.7 or NS6 there are problems.
I used frames earlier and it was working fine. Now I removed frames and I put tables instead. My applets are using the 100% for with and height. It's fine in IE because it takes the whole space in the table.
In NS4.7 it displays in a 2x2cm sized window any idea why? Might be that the 100% parameter is not allowed..
In NS6 the size of the applet is the window size and not the size of the table.
I would appreciate any solution. I know that NS has problems with the tables and to put the right size I should use a 1x1 pixel size point.
So how can I put 100% width and height for my applet?
0
Comment
Question by:kapitany
[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
6 Comments
 
LVL 3

Expert Comment

by:shyamkumarreddy
ID: 6206076
Hi Kapitany

I want to say few things to you.
may be this will be helpful to you.

Allways HTML tags takes up the space of the applet rather than table one.

If u define the size of the applet width tag then table size is not taken.

What do u want ur final output to be
Shyam
0
 

Author Comment

by:kapitany
ID: 6209526
I have a table on the full screen. The applet is running on the right side table. The applet parameter are:
<applet
  CODEBASE      = "."
  CODE          = "application.applet.class"
  NAME          = "myvocwords"
  ARCHIVE      = "/common/applet.jar"
  WIDTH        = 100%
  HEIGHT       = 100%
  HSPACE       = 0
  VSPACE       = 0
  ALIGN        = top
  MAYSCRIPT VIEWASTEXT
>
</applet>
So I would like that my applet takes the whole space in the right table. In 4.7 it's just a tigny 1cm x 1cm applet and on N6 it puts the scrollbars because the applet size will be the full screen and therefore if the left side table is added the size is bigger than the window.
0
 
LVL 3

Expert Comment

by:shyamkumarreddy
ID: 6209568
Hey Kapitancy

Did u try with exact size rather than 100%

Shyam
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Accepted Solution

by:
happynut earned 100 total points
ID: 6250331
You might try use javascript to work around this bug.

<SCRIPT ID=AutoSizingScript LANGUAGE=JavaScript>
<!--
function window_OnResize()
{
    document.myvocwords.setHTMLSize( innerWidth, innerHeight );
}

function window_OnLoad()
{
    if (navigator.appName == "Netscape" && navigator.appVersion[0] == "4")
       {
           captureEvents(Event.RESIZE);
           onresize=window_OnResize;
       }
}

In your html file,

<BODY BGCOLOR="003668" LANGUAGE="JavaScript" ONLOAD="return window_OnLoad();">

In your applet define a following method.

public void setHTMLSize( String strWidth, String strHeight )
{
         int nWidth  = Integer.parseInt( strWidth  );
         int nHeight = Integer.parseInt( strHeight );
         
         Container container = getParent();
         
         container.setBounds( 0, 0, nWidth, nHeight );
         container.validate();        
}

Hope this helps.
happynut

0
 
LVL 5

Expert Comment

by:Netminder
ID: 6822017
Force/accepted by

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

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…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

632 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