private static void destroyWindow() { if (!window_created) { return; } if (parent != null) { parent.removeComponentListener(component_listener); } releaseDrawable(); // Automatically destroy keyboard & mouse if (Mouse.isCreated()) { Mouse.destroy(); } if (Keyboard.isCreated()) { Keyboard.destroy(); } display_impl.destroyWindow(); window_created = false; }