title: My Graphics aren't drawing
body: <p>I am trying to make a GUI using Java graphics, but for some reason it won't work. Here is the code:</p>
  
  <pre><code>public class ScreenCap extends Canvas {
  
  /**
   * @param args the command line arguments
   */
  @SuppressWarnings("ResultOfObjectAllocationIgnored")
  public static void main(String[] args) {
      new ScreenCap();
  }
  
  public ScreenCap() {
      Window window = new Window(this);
      window.setVisible(true);
      this.addMouseListener(new MouseHandler());
      drawComponents();
  }
  
  private void drawComponents() {
      System.out.println("in draw");
      createBufferStrategy(3);
      BufferStrategy bs = getBufferStrategy();
  
      Graphics g = bs.getDrawGraphics();
  
      g.setColor(Colors.BG);
      g.fillRect(0, 0, getWidth(), getHeight());
  }
  }
  </code></pre>