aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JFrame freezes on Windows 8.1 when resized Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFrame freezes on Windows 8.1 when resized" Watch "JFrame freezes on Windows 8.1 when resized" New topic
Author

JFrame freezes on Windows 8.1 when resized

Paweł Baczyński
Bartender

Joined: Apr 18, 2013
Posts: 1020
    
  16

I posted it yesterday on stackoverflow.com but did not receive a solution to the problem.

A problem regarding resizing this JFrame.

This is how it looks by default right after program starts:


When I try to resize it like shown on a picture and move a mouse pointer to the top of a screen (like on picture below) I see this:


When I release the mouse the frame is resized but unresponsive. And there is a black space on it. This is how it looks:


This happens on Windows 8.1 and java 1.7.0_45 (it also happens on Windows 7).
The problem does not occur when using other ways of resizing a frame in Windows.
It only happens when "Show window contents while dragging" is active in system settings.
Why is it happening?
How can this be fixed?


Formely Pawel Pawlowicz
Sam Gooding
Ranch Hand

Joined: Dec 06, 2013
Posts: 35
I am not sure it's not a new Swing bug since I have also had that in a commercial application built on a recent JDK. I just this moment confirmed it with IntelliJ 13.0.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

Pawel Pawlowicz wrote:This happens on Windows 8.1 and java 1.7.0_45 (it also happens on Windows 7).
The problem does not occur when using other ways of resizing a frame in Windows.
It only happens when "Show window contents while dragging" is active in system settings.
Why is it happening?
How can this be fixed?

This could be a windoze + swing compatibility issue. Or windoze issue. I do not think there is anything you can do. (Of course you can your users to disable the "Show window contents...." setting but thats hardly an elegant solution.
Did you check the sun bug database if anyone has launched this already? If not you might want to consider launching it as a bug yourself.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Piet Souris
Ranch Hand

Joined: Mar 08, 2009
Posts: 650
    
  11
Now that you mention it...

I have noticed some unexpected behaviour as well, on Windows 7. But I get the idea that it is
some 'feature' of Windows.

When I drag the upper border to the top of the screen (and it is only for the top of the screen), then I get
the behaviour as described.

But also: when I drag the frame to the top of the screen, i.e. mouse in the title bar,
then on release of the mouse, the frame completely covers the screen.

And when I drag the frame a couple of times from left to right and back, in a quick succession,
then the underlying windows disappear. Repeating this, then the underlying windows reappear again.

I had noticed this before, but I thought my laptop went crazy. But now, as I said, I get the impression
that it is a Windows feature, enabling to easily maximize the window in some way...

Anyway, there is no freezing, since when you drag that strange frame a little, the frame is re-installed to its
previous size.

Greetz,
Piet
Piet Souris
Ranch Hand

Joined: Mar 08, 2009
Posts: 650
    
  11
Update:

just tested this on windows from Skype, Google Chrome and Incredimail: I see the exact same
behaviour. So, I think it is indeed a Windows feature (unless all these applications are written
in Java as well...).

Update 2: indeed a Java bug. If you minimize the window and then re-instate, then things
are okay. So there's a component not being resized as it should, right after dragging.
But it's minor, I see no freezing.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JFrame freezes on Windows 8.1 when resized