Screen display size

前端 未结 7 1085
长情又很酷
长情又很酷 2021-01-19 03:50

Hi I\'m writing a graphics program and I\'ve been searching for a way to get the physical size of the screen being used. I can get the size of the screen in pixels and also

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-19 04:10

    Use the getScreenResolution() method of Toolkit class which does returns the screen resolution in dots-per-inch. (ref javadocs)

提交回复
热议问题