instances P1 and P2 are then added to applet window. The background colour of two panels and applet
window is chosen different just for differentiation.
17.5 GRIDBAGLAYOUT
A GridBagLayout is similar to a GridLayout in that the container is broken down into rows and
columns of rectangles. However, a GridBagLayout is much more sophisticated because the rows do not
all have to be of the same height, the columns do not all have to be of the same width and a component in the
container can spread over several rows and columns. There is a separate class, GridBagConstraints ,
that is used to specify the position of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.