JDK-4193219 : Wrong JInternalFrame.DesktopIcon initial location and after resize
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.2.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,solaris_2.6,windows_95
  • CPU: generic,x86,sparc
  • Submitted: 1998-11-27
  • Updated: 1999-02-18
  • Resolved: 1999-02-18
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.
Other
1.2.2 1.2.2Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
Problem #1 - Wrong initial location for JInternalFrame.DesktopIcon

   Iconify a JInternalFrame.
   Move the icon.
   Iconify a second JInternal Frame.

   The second icon is placed relative to the new location of the
   first icon, instead of the free space at the bottom of the parent container.


Problem #2 - Wrong JInternalFrame.DesktopIcon location after parent resize

   Iconify a JInternalFrame.
   Resize the parent container to be larger via mouse drag.

   The icon remains at the same location instead of moving to the bottom
   of the resized parent container.  The correct action is to displace
   all icons along the y axis by an amount equal to the difference in
   the height of the current and original parent container.  In other words,
   the new location of each icon should be the same relative to the bottom
   of the parent container.


Fill in your own JAVA_HOME and TESTBASE locations in the following short script
to reproduce this problem using the interactive JCK tests for JInternalFrame...

#!/bin/sh

#
# The JDK and JCK locations
#

JAVA_HOME=/js/files/JDK1.2_latest/solaris
TESTBASE=/net/castor/jtg/testbase/src/JCK-12a

CLASSPATH=${TESTBASE}/classes:${TESTBASE}/javatest.jar
export CLASSPATH

${JAVA_HOME}/bin/java  javasoft.sqe.tests.api.javax.swing.interactive.JInternalFrame.JInternalFrameTests -TestCaseID JInternalFrameTest0006

james.melvin@East 1998-11-27

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.2.2 generic FIXED IN: 1.2.2 INTEGRATED IN: 1.2.2
14-06-2004

WORK AROUND Do not move any icons and do not resize the parent container!
11-06-2004

EVALUATION For the first problem, added code to look for the first empty space and put the icon there. For the second problem, added component listeners for the desktop to all frame ui's, rather than just maximized ones, so that we could adjust their icon positions when the size of the desktop changes. Much of the code used originates with James Melvin's code, as suggested in his Suggested Fix, but I fixed some problems that I found in that code. hania.gajewska@Eng 1999-02-12
12-02-1999

SUGGESTED FIX There is a shadow bug in the java_solaris/awt category. This bug has been fixed in the JDK1.2 dev05 release by the Java Technologies Group. To see get the fix, see the following files/deltas in the JTG workspace... update: src/share/classes/javax/swing/DefaultDesktopManager.java 1.19 update: src/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java 1.51 I can provide these if you like. james.melvin@East 1998-11-27
27-11-1998