Container Classes

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   go to next page

Answer:

A window.

Container Classes

A GUI program consists of a collection of graphical components that are all placed inside one or more windows. The components are contained by the window. A container is an object that can hold other GUI components. Visually, a container is an area of the screen and the objects it contains are shown as smaller areas within it.

In Java terminology, a window (such as the browser window you are looking at) is a container. Buttons, sliders, icons and other GUI components are always put in container.

QUESTION 8:

Do you think that a container can contain another container?