Minimize, Restore and Maximize browser window (from Java applet)?


I am running a Java applet and based on some events I want to maximize, minimize or or restore a minimized window.

I can call JavaScript or if possible do it in an applet (which I doubt).


PS.  I tried these - that I found on the Internet, but they did not work for me:

 function minimize_window(){

 function minimize1_window(){
 function reshow_window(){
   if(show==0) {

function minimize2_window() {
    window.innerWidth = 100;
    window.innerHeight = 100;
    window.screenX = screen.width;
    window.screenY = screen.height;
    alwaysLowered = true;

function maximize2_window() {
    window.innerWidth = screen.width;
    window.innerHeight = screen.height;
    window.screenX = 0;
    window.screenY = 0;
    alwaysLowered = false;

function maximize2_window() {
  window.moveTo(0, 0);
  window.resizeTo(window.screen.availWidth, window.screen.availHeight)
 function reshow_window(){
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi akoifman,

I use the following in the head of one of my .htm file to make itself full screen, and it works for me every time in IE.  But note:  this is in the file loaded into the popped browser window - it sizes itself.

Peace and joy.  mvan

// ----- take focus and open browser full size -->
      window.moveTo(0, 0);
        av_height = screen.height - 20
        window.resizeTo(screen.width, av_height);
// ----- end open and full sizer code -->
akoifmanAuthor Commented:
This question has not been answered.  How to minimize a browser window.
You are right, I've only answered how to resize the browser, not how to minimize or restore it.  (Actually ... not even how to maximize it!)

I see you're really looking for minimize, maximize, and restore.

I don't have the answer at this moment.

Peace and joy.  mvan
According to: http:Q_20269069.html#6813358 you cannot use JavaScript to maximize a window.

According to: http:Q_10334328.html#2752410 you cannot minimize a window, because the 'method' does not exist.

If you created the window, you can restore it, using the .focus() method.  See:  http:Q_20656829.html#8781188

Peace and joy.  mvan

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.