Solved

applet size in Netscape

Posted on 2001-06-18
6
252 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
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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: 6788357
0
 
LVL 5

Expert Comment

by:Netminder
ID: 6822017
Force/accepted by

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Spring Framework HTTPSession management 1 45
by zero exception 10 51
Java Restore security prompts not working 10 50
Is Applet the way to go for my drag and drop system? 8 25
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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

791 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