If you change frame.setSize( 150, 100 ) to frame.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

The setSize() method of JFrame changes the size of the frame on the computer monitor. The size can be changed as the program runs. For example, the following program works (although it is mostly useless):

import java.awt.*;
import javax.swing.*;

public class TestFrame1
{
  public static void main ( String[] args )
  {
    int height=100, width=200;
    JFrame frame = new JFrame("Test Frame 1");
    frame.setSize( width, height );
    frame.setVisible( true );
    frame.setSize( width+50, height+75 );
  }
}

The frame starts out with size 200 by 100, and then changes size to 250 by 175.

QUESTION 7:

Is it possible to define a class that uses JFrame as a base (a parent) class?