public void paint(Graphics g)
	{
		try
		{
			sm.getCurrentScreen().clear();
			sm.getCurrentScreen().render();
		}catch(NullPointerException e){if(sm.getCurrentScreen()== null)System.out.println("Screen is null!!"); else e.printStackTrace();}

		int[] pix = sm.getCurrentScreen().pixels;
		for(int y = 0; y < sm.getCurrentScreen().height; y++)
		{
			for(int x = 0; x < sm.getCurrentScreen().width; x++)
			{
				pixels[width * y + x] = pix[width * y + x];
			}
		}


		g.drawImage(image, 0, 0, getWidth(), getHeight(), null);
		if(ScreenKeyListener.isKeyPressed(KeyEvent.VK_1))
		{
			g.setColor(Color.WHITE);
			g.drawString(gUpdates + " ups, " + gFrames + " Frames", 0, 10);
		}
		g.dispose();
	}