code: private void initWindowed(Resolution output)
      {
          final Canvas canvas = new Canvas(conf);
          canvas.setBackground(Color.BLACK);
          canvas.setEnabled(true);
          canvas.setVisible(true);
          canvas.setIgnoreRepaint(true);
  
          frame.add(canvas);
  
          canvas.setPreferredSize(new Dimension(output.getWidth(), output.getHeight()));
          frame.pack();
          frame.setLocationRelativeTo(null);
  
          ToolsAwt.createBufferStrategy(canvas, conf);
          buf = canvas.getBufferStrategy();
  
          // Set input listeners
          componentForKeyboard = canvas;
          componentForMouse = canvas;
          componentForCursor = frame;
          frame.validate();
      }
docs: Prepare windowed mode.
  
  @param output The output resolution
  @throws LionEngineException If unable to initialize windowed mode.