June 2002
Beginner to intermediate
640 pages
14h 24m
English
For review, let's cover the class hierarchy of JFrame and then Frame. Start up the interactive interpreter and follow along. To get the superclass of JFrame, import JFrame, and then inspect its superclass property.
>>> from javax.swing import JFrame >>> JFrame.superclass <jclass java.awt.Frame at 214168159>
To find out Frame's superclass, append another superclass to it. Since superclass is an instance of jclass and jclass has the property superclass, we can get the superclass of JFrame's superclass like this:
>>> JFrame.superclass.superclass <jclass java.awt.Window at 217313887>
We can continue to do this until we hit Object.
>>> JFrame.superclass.superclass.superclass <jclass java.awt.Container ...
Read now
Unlock full access