Bug 452573 - Bad window size calculation after using pack()
Summary: Bad window size calculation after using pack()
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Lillian Angel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 466620 478594 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-23 19:57 UTC by Robert Marcano
Modified: 2009-02-05 02:23 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-02-02 15:41:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Test case (533 bytes, text/plain)
2008-06-23 19:57 UTC, Robert Marcano
no flags Details
OpenJDK screenshot (3.92 KB, image/png)
2008-06-23 19:59 UTC, Robert Marcano
no flags Details
Sun Java Screenshot (3.67 KB, image/png)
2008-06-23 20:00 UTC, Robert Marcano
no flags Details
Bug demostration (44.45 KB, image/png)
2008-07-15 16:09 UTC, Robert Marcano
no flags Details

Description Robert Marcano 2008-06-23 19:57:46 UTC
Description of problem:
The pack() method of the Window class allow to resize the window based on the
contents preferred sizes, when using OpenJDK on the following example, the
window always have a empty area below (that does not happens of the Sun Java
binaries)

  JFrame frame = new JFrame();
  JPanel panel = new JPanel(new FlowLayout());
  panel.add(new JButton("Testing..."));
  frame.setContentPane(panel);
  frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
  frame.pack();
  frame.setVisible(true);


Version-Release number of selected component (if applicable):
java-1.6.0-openjdk-1.6.0.0-0.15.b09.fc9.i386

See attached test case, and comparison screen shots

Additional info:
the font selection looks different too, but I think that is related to the
better font selection than the SUN Java do when using the GTK Look and Feel.

Comment 1 Robert Marcano 2008-06-23 19:57:46 UTC
Created attachment 310067 [details]
Test case

Comment 2 Robert Marcano 2008-06-23 19:59:59 UTC
Created attachment 310068 [details]
OpenJDK screenshot

See the empty are below. It happens using compiz and metacity, so it does not
looks like a Window Manager related problem at first sight

Comment 3 Robert Marcano 2008-06-23 20:00:39 UTC
Created attachment 310069 [details]
Sun Java Screenshot

Screenshot taken using the Sun Java

Comment 4 Lillian Angel 2008-06-24 17:23:07 UTC
I confirmed this and reported it upstream to Sun.

Comment 6 Lillian Angel 2008-07-15 15:40:02 UTC
Sun says this is not a bug, and intentional. Closing
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6721088

Comment 7 Robert Marcano 2008-07-15 16:09:10 UTC
Created attachment 311852 [details]
Bug demostration

I am sorry but this is a bad review from Sun, the new attached image shows the
minimum size of a window on Windows, and a the JFrame shown on Linux with the
problem, as you noticed the smallest window size has nothing to do with the bad
pack() behaviour. I will be adding comments to the Sun bug, please reopen this
in order to keep track of it

Comment 8 Lillian Angel 2008-07-15 16:14:20 UTC
sure

thx

Comment 10 Omair Majid 2009-01-09 19:04:04 UTC
*** Bug 478594 has been marked as a duplicate of this bug. ***

Comment 11 Omair Majid 2009-01-09 19:09:30 UTC
*** Bug 466620 has been marked as a duplicate of this bug. ***

Comment 12 Lillian Angel 2009-01-21 20:52:08 UTC
will be in the next release.

Comment 13 Lillian Angel 2009-02-02 15:41:02 UTC
this should be in rawhide within the next couple of days:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1098935

Comment 14 Fedora Update System 2009-02-05 02:23:25 UTC
java-1.6.0-openjdk-1.6.0.0-9.b14.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.