public void setBounds(int x, int y, int w, int h) { Rectangle oldBounds = getBounds(); _bigPort.setBounds(x, y, w, h); _cover.setBounds(x, y, w, h); Dimension nameDim = _name.getMinimumSize(); _name.setBounds( x + (w - nameDim.width) / 2, y + (h - nameDim.height) / 2, nameDim.width, nameDim.height); _x = x; _y = y; _w = w; _h = h; firePropChange("bounds", oldBounds, getBounds()); updateEdges(); }