JDK-7124489 : [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: Closed
  • Resolution: Duplicate
  • OS: os_x
  • CPU: generic
  • Submitted: 2011-12-23
  • Updated: 2011-12-28
  • Resolved: 2011-12-23
Related Reports
Duplicate :  
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.