Inheritance and GUI's

Inheritance is the ability for a class to automatically obtain (or inherit) all of the methods/variables of another class, usually called a parent or super class. A child class can do everything the parent or superclass can do but it usually adds or removes functionality by changing the attributes and characteristics.

A Graphic User Interface (GUI) component is an object that displays a screen element. For the short discussion of GUIs and inheritance, we will be using:

JFrame – displayed in its own window
JPanel – for organizing other components
JLabel – used to display a string