We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


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

akoifman asked
Medium Priority
Last Modified: 2008-01-09

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(){
Watch Question

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 -->


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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.