Red Hat Bugzilla – Bug 478594
Wrong BorderLayout management in JFrames
Last modified: 2009-01-09 14:04:04 EST
Created attachment 328040 [details]
Test program to see the behaviour
Description of problem:
OpenJDK has a bad behavior when it comes to display standard BorderLayout-based Swing GUIs. The BorderLayout.CENTER pane is always displayed even if there is nothing in it.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Download the attached code (Main.java)
2. javac Main.java
3. java Main
You'll see a grey zone that shouldn't exist.
Only a green and red zone.
It works perfectly (expected result) with Sun's dk-6u11 (jdk-1.6.0_11-fcs.x86_64). The same good result can be seen on any Windows or OSX machine running JDK 1.5 or 1.6.
Created attachment 328041 [details]
Created attachment 328042 [details]
Expected result with Sun JDK
The problem is caused by a mistake in the calculation of the window size.
*** This bug has been marked as a duplicate of bug 452573 ***