system.gui.reshapeComponent
Deprecated
As of 7.8.1
Sets a component's position and size at runtime. The coordinates work in the same way as the system.gui.moveComponent function.
system.gui. reshapeComponent( component, x, y, width, height )
-
Parameters
JComponent component - The component to move and resize
int x - The x-coordinate to move to, relative to the upper-left corner of the component's parent container.
int y - The y-coordinate to move to, relative to the upper-left corner of the component's parent container.
int width - The new width for the component
int height - The new height for the component
-
Returns
Nothing
-
Scope
Client
#This code would go in a Timer's propertyChange script for animation.
if
event.propertyName
=
=
"value"
:
newX
=
event.newValue;
newWidth
=
int
(event.newValue
*
1.5
)
rect
=
event.source.parent.getComponent(
"Rectangle"
)
system.gui.reshapeComponent(rect, newX,
150
, newWidth,
80
)