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

A good answer might be:

The frame will be 300 pixels wide by 100 high, twice as wide as previous.

Dimensions of a Frame

A frame-object has a setSize method that is used to change the size of the frame on the monitor of the computer. The size can be changed as the program runs. For example, the following program will work (although it is still a mostly useless program):

import java.awt.*;

public class ezGUI1
{
  public static void main ( String[] args )
  {
    Frame frm = new Frame();
    int width = 20;
    int height = 10;
    frm.setVisible( true );
    for ( int count=1; count<300; count++ )
      frm.setSize( width++, height++ );
  }
}

QUESTION 10:

Can you define your own class that uses the Frame class as a base (parent) class?

Click Here after you have answered the question