/** Override setBounds to keep shapes looking right. {@inheritDoc} */ @Override protected void setStandardBounds(int x, int y, int w, int h) { if (getNameFig() == null) { return; } Rectangle oldBounds = getBounds(); Dimension nameDim = getNameFig().getMinimumSize(); getNameFig().setBounds(x + MARGIN, y + SPACE_TOP, w - 2 * MARGIN, nameDim.height); divider.setShape(x, y + DIVIDER_Y + nameDim.height, x + w - 1, y + DIVIDER_Y + nameDim.height); getInternal() .setBounds( x + MARGIN, y + SPACE_TOP + nameDim.height + SPACE_MIDDLE, w - 2 * MARGIN, h - SPACE_TOP - nameDim.height - SPACE_MIDDLE - SPACE_BOTTOM); getBigPort().setBounds(x, y, w, h); cover.setBounds(x, y, w, h); calcBounds(); // _x = x; _y = y; _w = w; _h = h; updateEdges(); firePropChange("bounds", oldBounds, getBounds()); }