是否有 JFrame.getBounds 等效项仅获取实际客户区域?
而不是整个窗口都带有关闭、最大化和最小化按钮以及边框?
我正在尝试保存客户区的屏幕截图...maximizedBounds 使应用程序崩溃...
Instead of the whole window complete with close, maxi- and minimize buttons, as well as border?
I'm trying to save a screenshot of the client area...maximizedBounds crashes the app...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
获取内容窗格的边界(即
JFrame.getContentPane().getBounds()
)。Get the bounds of the content pane instead (i.e.
JFrame.getContentPane().getBounds()
).这做到了这一点:
This did the trick: