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: Screen Size Question



At 10:50 AM -0600 11/16/2002, Robert Westlund wrote:
What is the proper (cross-platform safe) way to get the *available* screen size for a full-screen window?

The toolkit getScreenSize() method returns the full screen resolution on OS X, whereas the actual available height for a full-screen frame is about 22 pixels less than that, due to the menubar. Do I need to make a JDirect or JNI call if my app is running on a Mac, or is there a simple Java method or system property I can use?

Keep in mind that the available height should also exclude the Dock if the Dock is positioned on the bottom of the screen (as it is by default). I'm not aware of any way to get the appropriate information from standard JDK APIs. The Carbon GetAvailableWindowPositioningBounds() API provides the dimensions you're looking for, but it isn't clear from recent comments from Apple if you'll be able to call this in future releases of Java on Mac OS X.

-Eric

--
Eric Albert email@hidden
http://rescomp.stanford.edu/~ejalbert/
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.

References: 
 >Screen Size Question (From: Robert Westlund <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.