public void setBounds(int x, int y, int w, int h) { int middle = w / 2; h = _h; Rectangle oldBounds = getBounds(); _bigPort.setLocation(x + middle - _bigPort.getWidth() / 2, y + h - 65); _head.setLocation(x + middle - _head.getWidth() / 2, y + h - 65); _body.setLocation(x + middle, y + h - 50); _arms.setLocation(x + middle - _arms.getWidth() / 2, y + h - 45); _leftLeg.setLocation(x + middle - _leftLeg.getWidth(), y + h - 35); _rightLeg.setLocation(x + middle, y + h - 35); Dimension minTextSize = _name.getMinimumSize(); _name.setBounds( x + middle - minTextSize.width / 2, y + h - minTextSize.height, minTextSize.width, minTextSize.height); updateEdges(); _x = x; _y = y; _w = w; // do not set height firePropChange("bounds", oldBounds, getBounds()); }