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

Answer:

The call to the superclass constructor must be the first statement in the MyFrame constructor.

Containers hold Component References

MyFrame is a Container, because it inherits from JFrame, so GUI components can be added to it. When a component is added to a container, a reference to the component is added to the list of components in the container.

Graphically, the components added to a container appear within the rectangle on the monitor allocated to the container. In the example program, the JLabel is added to the frame, and so appears within that area.

QUESTION 12:

Could additional JLabel references be added to MyFrame?