JDK-4986141 : "DeskTop Integration" dialog size is more then what it is needed.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-01-30
  • Updated: 2004-03-10
  • Resolved: 2004-03-10
Related Reports
Duplicate :  
Relates :  
Description
Bug Description:
----------------
The "DeskTop Integration" dialog size is more then what it is needed.

JDK-INFO:
--------
PIT - 18
java version "1.5.0"^M
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b99)^M
Java HotSpot(TM) Client VM (build 20040122100002.azeem.baseline, mixed mode)

Steps to reproduce:
-------------------
1.Install j2re1.5.0 PIT-18
2.Launch Controlepanel , in "Advance" tab, Select "Desktop Integration" option to "Prompt User".
3.Launch an jnlp application (javaws http://java.sun.com/products/javawebstart/apps/notepad.jnlp)
4."Desktop Integration" window will popup

the size of the window is more then the expected size.


###@###.### 2004-01-30

Comments
EVALUATION A JDialog.pack() before show() fixed the problem. but why we need 2 call to pack()?? ###@###.### 2004-01-30 Further investigation shows that this might be a swing problem instead. Try to compile the testcase attached in this bugreport: to run the testcase, type "java test" (put java48.png in the directory where compiled classes live) this will create a dialog, call pack() once and call show. on 1.4.2, everything works fine. on 1.5.0 b20, everything is fine too. on 1.5.0 b30, the dialog size is more than what it is needed. now if you run 1.5.0 b30 with "java test a", which will call pack() twice before show(), everything works fine too. But why do we need two call to pack() now? reassign to swing for further investigation. ###@###.### 2004-02-02 ----- ###@###.###, if you find this to be an AWT issue, please feel free to re-assign. ###@###.### 2004-02-17 Name: anR10225 Date: 03/10/2004 This bug is introduced by the fix to the bug 4446522. This fix will probably be rolled back. The reason is how the text area calculates its preferred size and the fact that the height of wrapped text area depends on its width. Initially the height is calculated laying on the default width (which is currently about 100 pix). The preferred height is recalculated when the width is explicitly set for the component. This occurs after the first pack() invocation. That's why the second pack() gets the desired preferred width and height from the text area. Currently I will close this bug as a duplicate of the bug 4990877 (priority 3). Though its symptoms are slightly different the reason is strictly the same. ======================================================================
11-06-2004

SUGGESTED FIX http://javaweb.sfbay/~ngthomas/webrevs/4986141/webrev/
11-06-2004