Answer:

Picture of the Frame

The TestFrame1 class is defined so that there is a place for the main() method. Because main() is a static method, it is not part of any object. Static methods can execute without being part of an object. Review the first chapter on objects (chapter 25) if this is unclear. Here is a picture of what is going on:

picture of the frame

When the main() method executes, it asks the system to create a JFrame object (with new). The variable frame refers to that object, so the object's methods can be called.

QUESTION 6:

If you change frame.setSize(150, 100)
to frame.setSize(300, 100) how will the frame appear?