A good answer might be:

When the program is running:

  • How many objects are there?
    • Just one, a Frame object, referred to by frm
  • Where is the main() method?
    • The main() method is static; it is not part of any object.

Picture of the Frame

Although the class ezGUI1 has been defined it is not instantiated. The main() method is a static part of that class, not part of any object. Review the beginning chapter on objects (currently chapter 25) if this is unclear. Here is a picture of what is going on:

Although the main() method is static, it can ask to create an object (with new) and its variable frm can refer to that object in main memory. The object is a Frame object which the Java system uses to paint what you see on the monitor.

QUESTION 9:

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

Click Here after you have answered the question