Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / August 2004

Tip: Looking for answers? Try searching our database.

maximize JFrame again and again (OS X)

Thread view: 
bernd_no_junk@hotmail.com - 24 Aug 2004 10:15 GMT
I know that this has been asked for the umpteenth time,
but still I can't figure out how to do it in OS X
(XP works fine).

1) getToolkit().isFrameStateSupported(MAXIMIZED_BOTH)
returns false

2) getMaximizedBounds returns null

3) graphicDevice.setFullScreenWindow makes my window disappear

currently i use
setBounds(0,0, SCREEN_WIDTH, SCREEN_HEIGHT - 80) in order
not to cover the task bar. this can't be the correct way!

Bernd
bernd_no_junk@hotmail.com - 24 Aug 2004 10:18 GMT
Sorry, forgot to mention: java version 1.4.2.

Bernd
Steve W. Jackson - 24 Aug 2004 17:21 GMT
>:I know that this has been asked for the umpteenth time,
>:but still I can't figure out how to do it in OS X
[quoted text clipped - 12 lines]
>:
>:Bernd

OS X has the Dock, not a "task bar".  And there's no reason that
maximizing a window can't overlap the Dock, regardless of its placement
or whether the user has it set to auto-hide.
Signature

Steve W. Jackson
Montgomery, Alabama

bernd_no_junk@hotmail.com - 24 Aug 2004 17:56 GMT
Dear Steve W. Jackson,

>OS X has the Dock, not a "task bar".

Ok, ok, I admit that I am quite ignorant regarding Macs and OS X...
>From now on I'll call that thingy by its truthful name.

> And there's no reason that
>maximizing a window can't overlap the Dock, regardless of its placement
>or whether the user has it set to auto-hide.

Well, there is. In my application a couple of button are at the bottom
of the frame.
Or stated differently: If I open my app in a smaller window, then click
the maximize button,
the frame is maximized and does not overlap the dock. Everything is
like it
should be. My simple question is: How do I do this programmatically in
a
correct fashion?

Bernd
Phaero - 24 Aug 2004 20:44 GMT
> Dear Steve W. Jackson,
>
[quoted text clipped - 21 lines]
>
> Bernd

I had a similar problem on Windows XP when using the standard java
decorations on a JFrame, you could try this but since I don't have a mac
 I can't try this myself...

http://www.segolsson.se/index.php?p=6

/Johan
Bernd - 26 Aug 2004 19:25 GMT
> I had a similar problem on Windows XP when using the standard java
> decorations on a JFrame, you could try this but since I don't have a mac
>   I can't try this myself...
>
> http://www.segolsson.se/index.php?p=6

Thanks, that did the trick (I added a setBounds).

My working code for OS X is:

GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
setMaximizedBounds(env.getMaximumWindowBounds());
setBounds(env.getMaximumWindowBounds());

Bernd


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.