Picture of MyFrame

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   go to next page

Answer:

Yes. You might copy the program and try this.

Picture of MyFrame

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.

diagram of myframe

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.

QUESTION 13:

Can the MyFrame on the monitor be clicked and dragged, and resized?