Lesson plan for teaching java graphics Background:
This lesson should give a firm foundation for graphics in Swing in java to students in high school who know OOP in java (extends, implements and abstract, as well as composition). They are in the school's CS major. This year they need to create a project which is a part of their final grade in the CS major, and part of the requirements are a visible GUI. As of such, a lesson plan was created to teach them one of the ways of making GUI in java. However, this lesson doesn't teach what goes on in the background of java GUI. (unintended pun)
What I have:
Currently the lesson plan is as follows:
Purpose: To teach the basics of creating GUI in java, for the students' final project.
Needed knowledge: Object Oriented Programming, as taught in previous grade (In the previous grade they were taught the concepts listed in the Background section)
Needed materials: Computers, preferably one per student (Students can bring their laptops), Internet connection.
Procedure:

Explain the basic objects inside the Swing library: JFrame, JPanel etc.

Explain the Container object in AWT, and elaborate on how Swing is heavily dependent on AWT. All* objects in Swing are children of objects in AWT. Also explain the Component class object.

Show that Container essentially contains (hence the fancy name) other Components and that creates a GUI.

Show the students a simple GUI for a chat application (no server-client, just the gui!) which composes of a JButton, JTextField (for entering messages), JTextPane (chat history) and JLabel. This step includes showing them the code.

let them work for the remaining time (45 mins plus 45-time_it_took_to_get_to_this_step) on creating a gui of their own, of their choosing, which can have any Swing object they find. The GUI must have JLabel, JButton and JTextField. Other than that, go wild.


My problem:
This lesson shows absolutely nothing about what Java does in the background for the GUI. I am talking about the intensive OOP the goes on in the JFrame class, and the incredible flexibility with everything extending JContainer (allows JButton, JLabel and many others to be treated almost identically).
How could I extends one (or more) of the above steps, or possibly add a new one, that will teach these parts of java GUI? I find that these parts are important for anyone who wants to make Java GUI. Would simply saying what I have written in the previous paragraph be enough?

*Haven't checked, but never seen one that isn't.
You could extend (heh) your lesson to include custom painting.

Basically, you do this by extending JComponent or JPanel and overriding the paintComponent() function. This is how "real" Swing components draw themselves, and it gives students a window into how everything works behind the scenes. You could have them draw  basic scenes, animations, or even games. Or you could have them create custom components like circular buttons (disclaimer: I wrote this example).

If you have enough time, you might want to split this into multiple lessons: start with basic Swing, then do a lesson on input listeners, then do a lesson on custom painting. At the end of those lessons they'll have enough knowledge to create some pretty fun programs.

I'd also urge you to stick with functional GUIs instead of using a non-functional chat application. Make a fun calculator that does something like convert dog years, or create a basic game that plays rock-paper-scissors. Encourage students to make these as interesting as possible. IMHO this is much more engaging than a non-functional example gui.