Home Segments Top Top Previous Next

963: Mainline

When arranging components within a container, Java provides position and size knowledge to each component via the setBounds method, as in the following expression, where the upper–left corner of the component is to lie at the position within its container given by x and y, and the width and height are width and height.

component.setBounds(x, y, width, height)