How to get extendedState width of JFrame

别说谁变了你拦得住时间么 提交于 2019-12-12 00:46:14

问题


  • I have a JFrame of which extended state option is set to MAXIMIZE_BOTH

  • When i want to get the width of the JFrame it returns 0.

so WHY?


回答1:


  • I have a JFrame of which extended state option is set to MAXIMIZE_BOTH

JFrame.getExtendedState() returns proper state

  • When i want to get the width of the JFrame it returns 0.

any coordinated are accesible after

  1. pack() is called

  2. for already visible container on the screen



来源:https://stackoverflow.com/questions/15152297/how-to-get-extendedstate-width-of-jframe

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!