Solved

Maximizing & Minimizing HTML

Posted on 1997-08-04
2
366 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
[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
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Notify sent to other threads in Java 9 41
wild fly 8 startup error 2 38
Find out all repos that a user is most active on Github 1 28
Java array 21 80
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
The viewer will learn how to implement Singleton Design Pattern in Java.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

756 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