backBuffer = new BufferedImage((int) ss.getWidth(), (int) ss.getHeight(), BufferedImage.TYPE_INT_ARGB);
final KeyboardHandler keyboardHandler = this.keyboardHandler;
final MouseHandler mouseHandler = this.mouseHandler;
final Surface graphics = this.graphics;
this.graphics = new BufferedImageSurface(backBuffer);
if (keyboardHandler != null) {
keyboardHandler.close();
}
if (mouseHandler != null) {