-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
1.4.0
-
x86
-
windows_nt
Name: jk109818 Date: 07/29/2002
FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
FULL OPERATING SYSTEM VERSION : Windows NT Version 4.0
A DESCRIPTION OF THE PROBLEM :
Currently, it is very difficult to make a SpringLayout
center its components with respect to the container or
another component. This is because there is no way of
saying the center of the component A should be a fixed
distance away from the center of the component B. So it
would be nice SpringLayout.Constraints is enhanced to allow
constraints on the center to be specified.
Also, the Spring class could be enhanced to allow
multiplication and division of springs. This would allow
constraints like: the width of component A should be half
the width of component B. You could define multiply and
divide as:
[a1, b1] * [a2, b2] = [a1 * a2, b1 * b2] and
[a1, b1] / [a2, b2] = [a1 / b1, a2 / b2]
respectively.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER WORKAROUND :
Currently, I am resetting all the constraints on the
components whenever the container resizes. This gives me
the desired effect but is not very convinient.
(Review ID: 159997)
======================================================================