Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: zoom button



Replying to an old thread, but...

Isn't set/getMaximizedBounds() for this?

http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Frame.html#getMaximizedBounds()

Just override getMaximizedBounds() ... or setMaximizedBounds() on your window, and you should be good to go, no?

-Alexei


On 21-Mar-08, at 11:56 AM, Mike Swingler wrote:

If you are looking to intercept this event to manually intervene to create a more "zoom to fit" behavior, please file an enhancement request at http://bugreporter.apple.com. Right now the "full size zoom" behavior is ok, but toggling between the window's pack()'ed size and the current size would be ideal for some windows.

Cheers,
Mike Swingler
Java Runtime Engineer
Apple Inc.

On Mar 21, 2008, at 8:00 AM, Peter Powers wrote:

Are you trying to do something like Safari and only maximize to the width or height of a rendered page? If not, I wouldn't go messing with the user's expectation of what the maximize button does. Just my two cents....

That said, the only event you could detect would be a resize via a ComponentListener on the Window. You'd receive the event after the system had already maximized the window, and through some trickery and guesswork, you might be able to capture most maximizations; guesswork b/c you don't know where the users dock is so the window bounds after resize does not necessarily equal the screenSize - menuBar.

Peter

On Mar 21, 2008, at 6:44 AM, Alan Snyder wrote:
So far, I have not been able to find the answer to this simple question...

Is there a way to customize the behavior of the "zoom button" (the green button
at the top of each window frame) in Java?


_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.