?
Solved

Maximizing & Minimizing HTML

Posted on 1997-08-04
2
Medium Priority
?
370 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 200 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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 basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses
Course of the Month9 days, 22 hours left to enroll

762 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