import javax.swing.JFrame;

/**
 * OurJFrame is a customized JFrame.
 * 
 * - {} braces are used to signal the 
 * beginning/end of a class/method definition
 * - "this" is used to indicate the object
 * that calls the method
 */ 
public class OurJFrame extends JFrame {
  
  /**
   * Double the size of the window.
   */ 
  public void doubleSize() {
    this.setSize(this.getWidth() * 2
                   , this.getHeight());
  }
  
  /**
   * Place the window at the origin.
   * 
   * Note name: start method/variable with
   * lowercase letters and any subsequent 
   * words begin with uppercase letters
   */
  public void moveToOrigin() {
    this.setLocation(0, 0);
  }
  
  /**
   * Set the title of the window to its
   * coordinates: X:__, Y:__.
   */
  public void setTitleXY() {
    // We'll finish this on Wednesday.
    this.setTitle("X: " + this.getX()
                    + " Y: " + this.getY());
  }
}
  
