• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JFrame freezes on Windows 8.1 when resized

 
Bartender
Posts: 2236
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Bartender
Posts: 5465
212
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Bartender
Posts: 5465
212
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic