To write a GUI application, write code for each of these three parts (while keeping the big picture in mind.) There are several ways to organize the code. If you keep the big picture in mind, the details about the various options will fall into perspective.
So far our examples have done only the first task.
There were no event listeners nor application code.
Our programs defined a myFrame
class,
constructed it,
and displayed it on the monitor.
Usually the first task would add many GUI
components (such as buttons and text fields) to the frame.
We will do this later on.