Yes. You might copy the program and try this.
The picture for this program shows
the class TestFrame2
with a static main()
method,
which is where the program starts running.
Then a MyFrame
object
is constructed using
the class definition.
The variable frame
refers to this object.
As the MyFrame
object is constructed,
a JLabel
is constructed and added to the frame.
After everything has been constructed and linked together with references, the graphics sytem takes over and draws visual version of all the components.
Can the MyFrame
on the monitor be clicked and dragged,
and resized?