JComponent class

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 GUI component constructed from a container class is expected to contain other GUI components.

JComponent class

Objects of classes based on Container have common characteristics. They can contain components, they themselves can be placed inside containers, they can be displayed on the monitor, they generate events, and they register event listeners. Since all Swing classes have Container as an ancestor, all Swing objects have these characteristics.

There are more Swing classes than those in the diagram. For example, there are several button types derived from AbstractButton, but we will look at just one.

QUESTION 11:

What letter starts the name of many Swing classes?