Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Maximizing a window in a multi-screen environment

843804Feb 14 2005 — edited Oct 29 2007
Hello.

I am developing a Java application which should work in a multi-monitor environment. In particular, I have a main JFrame that, when maximized, should span across all available monitors (typically, two monitors in a "one row" configuration).

The standard JFrame maximization only maximizes the JFrame on one monitor.

How to maximize the JFrame across all monitors? I've already iterated through the GraphicsEnvironment, GraphicsDevice and GraphicsConfiguration objects, and I am able to obtain the total size of the complete "virtual" desktop: but if I call the "setSize()" method and set the size of the JFrame equal to the size of the virtual desktop, then my JFrame will span across all monitors, but the status (i.e., the extended state) of my frame is not "maximized" (I still see the top right icon to maximize the frame). Not to mention that I have to keep into account the size and position of the Windows takbar...

Can you suggest a "clean" way to obtain a complete "multi-monitor" maximization of a JFrame?

Any help would be greatly appreciated.

Regards,

Marco.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2007
Added on Feb 14 2005
13 comments
1,041 views