How do you get the screen width in java?

前端 未结 12 665
说谎
说谎 2020-12-13 08:52

Does anyone know how you would get the screen width in java? I read something about some toolkit method but I\'m not quite sure what that is.

Thanks, Andrew

12条回答
  •  爱一瞬间的悲伤
    2020-12-13 09:33

    If you need the resolution of the screen that a certain component is currently assigned to (something like most part of the root window is visible on that screen), you can use this answer.

提交回复
热议问题