Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 JFrame,其扩展状态选项设置为 MAXIMIZE_BOTH
当我想获得 JFrame 的宽度时,它返回 0。
所以为什么?
JFrame.getExtendedState()返回正确的状态
任何协调后都可以访问
pack()叫做
pack()
对于屏幕上已经可见的容器