如何检查是否选择了显示?

How can I check if the display is selected?

我想检查是否选择了 LWJGL Display,即它是否在前景中。

Display.isInForeground()方法吗?

Display#isActive

Returns: true if window is active, that is, the foreground display of the operating system.

或者,如果您使用的是 LWJGL 3 和 GLFW,则等效于 glfwGetWindowAttribGLFW_FOCUSED