你能阻止 jframe 的标题栏调整 jframe 的大小而不删除它吗?

Can you stop a jframe's title bar from resizing the jframe without removing it?

This is a picture of the jframe in the design view vs when I'm actually running it. The title bar causes some components to be cut out of the frame.

有没有办法在不删除标题栏的情况下解决这个问题? 我在框架上使用“空布局”。

尝试将此代码添加到 initcomponents() 方法下方的构造函数中:

setExtendedState(JFrame.MAXIMIZED_BOTH);

如果这不起作用,请使用代码更新您的答案。