title: The Constructor Window() is not visible
body: <p>iam just starting programming in Java. Have issue with classes. As i try to use Windows in my project it keep shows this errors: Multiple markers at this line
  - The constructor Window() is not visible
  - The constructor Window(GameContainer) is
  undefined</p>
  <p>i tried make my class public but it didnt help. Can anyone helps me? Error is showing on Window lines in main class. Thanks anyone for helpss :)</p>
  <p>main class:</p>
  <pre><code>package g_core_engine;
  
  import java.awt.Window;
  import java.awt.BorderLayout;
  import java.awt.Canvas;
  import java.awt.Dimension;
  import java.awt.Graphics;
  import java.awt.image.BufferStrategy;
  import java.awt.image.BufferedImage;
  
  import javax.swing.JFrame;
  
  public class GameContainer implements Runnable{
  
      private Thread thread;
      private Window window;
      private boolean running = false;
      private final double UPDATE_CAP = 1.0 / 60.0;
      private int width = 320, height = 240;
      private float Scale = 4;
      private String title = &quot;g_core_engine v1.0&quot;;
      
      public GameContainer()
      {
          
      }
      
      //Method that starts the actual computing of the game
      public void start()
      {
          window = new Window();
          
          thread = new Thread(this);
          thread.run();
      }
      
      public void stop()
      {
          
      }
      
      //Method that contains the update and render loops
      public void run()
      {
          running = true;
          
          boolean render = false;
          enter code heredouble firstTime = 0;
          double lastTime = System.nanoTime() / 1000000000.0;
          double passedTime = 0;
          double unprocessedTime = 0;
          
          double frameTime = 0;
          int frames = 0;
          int fps = 0;
          
          
          while(running)
          {
              render = false;
              firstTime = System.nanoTime() / 1000000000.0;
              passedTime = firstTime - lastTime;
              lastTime = firstTime;
              
              unprocessedTime += passedTime;
              frameTime += passedTime;
              
              while(unprocessedTime &gt;= UPDATE_CAP)
              {
                  unprocessedTime -= UPDATE_CAP;
                  
                  render = true;
                  //TODO: Update Game
                  if(frameTime &gt;= 1.0)
                  {
                      frameTime = 0;
                      fps = frames;
                      frames = 0;
                      System.out.println(&quot;FPS: &quot;+fps);
                  }
              }
              
              if(render)
              {
                  //TODO: Render Game
                  window.update();
                  frames++;
              }
              else
              {
                  try
                  {
                      thread.sleep(1);
                  }
                  catch(Exception ex)
                  {
                      ex.printStackTrace();
                  }
              }
          }
          
          dispose();
      }
      
      public void dispose()
      {
          
      }
      
      //Main method that runs on program start
      public static void main(String[] args)
      {
          new GameContainer().start();
  
      }
  
      public int getWidth() {
          return width;
      }
  
      public void setWidth(int width) {
          this.width = width;
      }
  
      public int getHeight() {
          return height;
      }
  
      public void setHeight(int height) {
          this.height = height;
      }
  
      public String getTitle() {
          return title;
      }
  
      public void setTitle(String title) {
          this.title = title;
      }
  
      public int getScale() {
          // TODO Auto-generated method stub
          return 0;
      }
  
  }
  </code></pre>
  <p>second class:</p>
  <pre><code>package g_core_engine;
  
  import java.awt.BorderLayout;
  import java.awt.Canvas;
  import java.awt.Dimension;
  import java.awt.Graphics;
  import java.awt.image.BufferStrategy;
  import java.awt.image.BufferedImage;
  
  import javax.swing.JFrame;
  
  public class Window 
  {
      private JFrame frame;
      private BufferedImage image;
      private Canvas canvas;
      private BufferStrategy bs;
      private Graphics g;
      
      public Window (GameContainer gc) 
      {
      image = new BufferedImage(gc.getWidth(), gc.getHeight(), BufferedImage.TYPE_INT_RGB);
      canvas = new Canvas();
      Dimension s = new Dimension((int)(gc.getWidth() * gc.getScale()), (int)(gc.getHeight() * gc.getScale()));
      canvas.setPreferredSize(s);
      canvas.setMaximumSize(s);
      canvas.setMinimumSize(s);
      
      frame = new JFrame(gc.getTitle());
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setLayout(new BorderLayout());
      frame.add(canvas, BorderLayout.CENTER);
      frame.pack();
      frame.setLocationRelativeTo(null);
      frame.setResizable(false);
      frame.setVisible(true);
      
      canvas.createBufferStrategy(2);
      bs = canvas.getBufferStrategy();
      g = bs.getDrawGraphics();
      }
      public void update()
      {
          g.drawImage(image, 0, 0, canvas.getWidth(), canvas.getHeight(), null);
          bs.show();
      }
  }
  </code></pre>