JDK-7124213 : [macosx] pack() does ignore size of a component; doesn't on the other platforms.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: generic
  • Submitted: 2011-12-23
  • Updated: 2017-05-24
  • Resolved: 2012-09-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8 b61Fixed openjdk7uFixed
Related Reports
Duplicate :  
Relates :  
Description
http://java.net/jira/browse/MACOSX_PORT-769 submitted 2011/12/08 by Yuri Nesterenko
Target functionality of this test (included) seems working (well, not exactly, see the next bug) but there's a layout issue. We have 
<ul class=&quot;alternate&quot; type=&quot;square&quot;>
.a Frame without defined size;
.added there a Panel with BorderLayout() also without set size;
.added there a ScrollPane with setSize(200,200);
.added to that, a Component with setPreferredSize(300,300).Now, frame.pack() on this port does collapse the Frame to the absolute minimum. Should it be so? On other platforms it has size slightly bigger than 200,200. 
Setting preferred size (not minimum) of ScrollPane to 200,200 fixes that.

Comments
Fixed: http://hg.openjdk.java.net/jdk8/awt/jdk/rev/39227bb92978
27-09-2012

SUGGESTED FIX http://cr.openjdk.java.net/~serb/7124213/webrev.00/
16-04-2012