JDK-7152877 : [macosx] setText/pack, applied twice, stop resizing
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P4
  • Status: Resolved
  • Resolution: Won't Fix
  • OS: os_x
  • CPU: x86
  • Submitted: 2012-03-11
  • Updated: 2021-03-08
  • Resolved: 2014-03-31
Related Reports
Relates :  
Description
Mac OS X 10.7.3 macmini4,1
Run a regression test closed/java/awt/Frame/PackTwiceTest/PackTwiceTest.
It doesn't set any sizes to a Frame and added there TextField but sets to the TextField first, a short text, then, a long one, calling pack() in between. Twice.
As a result, on Apple JDK 6 the Frame is of the first text size; on 7u4 b14 it has minimal possible size (just enough to show system buttons).

Comments
I'm closing it as it depends on JDK-7133527 which has been closed.
31-03-2014

EVALUATION On X11 and Windows the frame gets correct size. On OSX the frame gets minimal size which fits to the toplevel control buttons, the text field is even lesser (it contains only 2 characters). When I leave in the code only one pack() call, the frame's size doesn't change but the textfield starts to occupy the whole space of the frame (but it only shows "I am a leng" part of the sentence).
22-03-2012