Solved

Maximizing & Minimizing HTML

Posted on 1997-08-04
2
364 Views
Last Modified: 2012-05-05
I'm programming two applets that are comunicating data and now I'm
interested in maximize the applet that has the focus and minimize the
other.

The problem are that the HTML page gives a fixed size to every applet and I
can't modify.

I've tried hiding the applet but it doesn't works.


TIA




0
Comment
Question by:scc080497
2 Comments
 
LVL 1

Expert Comment

by:katya062697
ID: 1224425
There is no way to minimize an applet, since the applet's area is *always* fixed by the height and width parameters of the surrounding html page. This is a very unfortunate limitation.

The only thing you can do is to override the gotFocus() and lostFocus() methods of the applet, and then do something to show that the applet is active/inactive. You could, for instance, do a removeAll() (which removes all components) or something similar to clear the area of the inactive applet, and if you applet has the same background as the surrounding page if would just look as an empty space.

Unfortunately, hide() does not work on top level objects (applet).
Probably not what you wanted to hear, but I think this is the best that can be done. Sorry
0
 
LVL 4

Accepted Solution

by:
rembo earned 100 total points
ID: 1224426


There are two things that you can try that are really tricks.  

The first would be to size the applet to the maximum size that
you might want it to be.  Then place a panel inside the applet
that you do a resize on.  The other is to use a CardLayout and
to have differennt size panels in the different cards.  

Just a couple of suggestions.

-Tony

0

Featured Post

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum6 challenge 6 86
Windows 10 IE Certificate Issue 10 47
javap not working 8 46
How to determine if a string is a valid SHA value 7 34
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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 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:

821 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