go to previous page   go to home page   go to next page

Answer:

Yes.


JPanel

A JPanel is a container that is used to group components together. A panel corresponds to a rectangular section of the screen. However, panels do not have visible edges. To layout components using JPanels:

  1. Decide on how to divide the frame into panels.
  2. Add GUI components to panels .
  3. Add the panels to the frame.

Each panel has its own layout manager. The default layout manager of JPanel is flow layout, which is often ideal, but you may use another layout manager if appropriate.

When the panels are added to a frame, the frame's layout manager arranges the panels as if each panel were a single component.


QUESTION 3:

Does the frame's layout manager affect the arrangement of the components in a panel?