Class Window

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class Window extends JFrame
Window created with java.awt and javax.swing and featuring a Canvas2D instance.
Version:
$Id: $Id
Author:
pastthepixels
See Also:
  • Field Details

    • canvas

      public Canvas2D canvas
    • stopOnClose

      public boolean stopOnClose
  • Constructor Details

    • Window

      public Window()

      Constructor for Window.

    • Window

      public Window(Vector2 size)

      Constructor for Window taking a Vector2 as a parameter for the windows's size.

      Parameters:
      size - a Vector2 object
    • Window

      public Window(String title)

      Constructor for Window with a title.

      Parameters:
      title - a String object
    • Window

      public Window(Vector2 size, String title)

      Constructor for Window with both a size and title specified.

      Parameters:
      size - a Vector2 object
      title - a String object
  • Method Details

    • init

      public void init()

      Creates a new window with javax.swing and java.awt.

    • open

      public void open()
      Displays the window on the screen.
    • close

      public void close()
      Closes the window. If Window.stopOnClose is set to true, it will also stop the entire program.