import javax.swing.*;

/** An instance is a JFrame with methods for getting
 area and squaring the window. */
public class SquareJFrame extends JFrame {
    /** Set the height of the window to the width */
    public void setHeightToWidth() {
        setSize(getWidth(), getWidth());
    }
    
    /** = the area of the window */
    public int area() {
        return getWidth() * getHeight();
    }
    
}