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 / November 2004

Tip: Looking for answers? Try searching our database.

JFrame bug?

Thread view: 
johndoe@example.com - 16 Nov 2004 22:38 GMT
WinXP Pro w/SP2, all patches applied, JDK 1.5.0.

When using the Java look & feel, maximizing a JFrame makes it use the
entire screen, including the Windows task bar.

When using the Windows look & Feel, maximizing a JFrame makes it use
only that part of the screen not taken by the Windows task bar.

Bug?  Expected behavior?
Chris Smith - 16 Nov 2004 22:48 GMT
wrote:
> WinXP Pro w/SP2, all patches applied, JDK 1.5.0.
>
[quoted text clipped - 5 lines]
>
> Bug?  Expected behavior?

I don't see it at all.  Is there a specific way you're maximizing the
window?  Are you doing it programmatically (with setExtendedState) or
using the button on the title bar?

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

johndoe@example.com - 18 Nov 2004 03:03 GMT
>> WinXP Pro w/SP2, all patches applied, JDK 1.5.0.
>>
[quoted text clipped - 9 lines]
> window?  Are you doing it programmatically (with setExtendedState) or
> using the button on the title bar?

The button on the title bar.
VisionSet - 16 Nov 2004 22:57 GMT
> WinXP Pro w/SP2, all patches applied, JDK 1.5.0.
>
[quoted text clipped - 5 lines]
>
> Bug?  Expected behavior?

I've noticed this also, intermittent behaviour.
Often it will maximise as a native app for ~1 second then maximise again to
cover the task bar.  This was in 1.4.2 but also I see the same in 1.5

--
Mike W
johndoe@example.com - 18 Nov 2004 03:05 GMT
>> WinXP Pro w/SP2, all patches applied, JDK 1.5.0.
>>
[quoted text clipped - 9 lines]
> Often it will maximise as a native app for ~1 second then maximise again to
> cover the task bar.  This was in 1.4.2 but also I see the same in 1.5

The same is happening here!  I noticed the small delay between
"maximized except for task bar" to "maximized including task bar" too.
Very peculiar!
Chris Smith - 18 Nov 2004 04:29 GMT
> The same is happening here!  I noticed the small delay between
> "maximized except for task bar" to "maximized including task bar" too.
> Very peculiar!

Sounds like a bug to me.  The JDK contains a sort of "backup" code to
implement maximizing a frame by resizing to the full screen size.  This
is only supposed to be used if there is no native concept of maximizing
a window.

I'd check for this on Bug Parade, and submit a new bug if it's not
there.

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

John McGrath - 18 Nov 2004 05:55 GMT
> WinXP Pro w/SP2, all patches applied, JDK 1.5.0.
>
[quoted text clipped - 5 lines]
>
> Bug?  Expected behavior?

I am guessing that you have done a setDefaultLookAndFeelDecorated( true );

If so, then the answer is [sort of] expected behavior.  Sun's position is
that this is "as designed".  I would call it a specification error.

The key point is that a maximized Frame occupies the client area of the
screen when it is decorated and occupies the full screen when it is
undecorated.  I am not sure I understand why that should be the case, but
that is how Sun says it should work.  I agree that there are cases where
you want undecorated frames to maximize to full screen (I just used this a
few weeks ago), but the programmer needs more control over this.

You have run into the case where the behavior is *clearly* wrong, at least
in my opinion.  When you set DefaultLookAndFeelDecorated to true, a JFrame
will ask the look-and-feel draw the frame decorations.  Assuming that the
look-and-feel supports this (Metal does, Windows does not), it sets the
Frame to undecorated and tells the look-and-feel to draw the decorations.
But since the Frame is undecorated (it does not know or care what the LAF
is drawing inside the Frame), it maximizes to full screen.

There is more information on the issue (including a work-around) at:

   http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4737788

Signature

Regards,

John McGrath

johndoe@example.com - 18 Nov 2004 22:12 GMT
> I am guessing that you have done a setDefaultLookAndFeelDecorated( true );
>
[quoted text clipped - 19 lines]
>
>     http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4737788

Thank you, John, for this information.  It now makes sense to me *why*
it's happening, though I agree with your conclusion that the behavior
is clearly wrong.


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.