Closed. This question needs to be more focused。它当前不接受答案。
想改善这个问题吗?更新问题,使其仅通过editing this post专注于一个问题。
3年前关闭。
我正在创建一个Java应用程序。我想将jframe保持在最大化状态。我想在许多具有不同屏幕尺寸的显示器上使用它。我想在jframe中的组件与jframe一起调整大小。我还需要添加图像到框架的背景。该图像也应使用jframe调整大小。怎么做?
想改善这个问题吗?更新问题,使其仅通过editing this post专注于一个问题。
3年前关闭。
我正在创建一个Java应用程序。我想将jframe保持在最大化状态。我想在许多具有不同屏幕尺寸的显示器上使用它。我想在jframe中的组件与jframe一起调整大小。我还需要添加图像到框架的背景。该图像也应使用jframe调整大小。怎么做?
最佳答案
布局管理器,布局管理器,布局管理器
首先看一下
A Visual Guide to Layout Managers
How to Use Various Layout Managers
Using Layout Managers
您可能还想看看Full-Screen Exclusive Mode API,这取决于您希望实现的目标
我也需要将图像添加到框架的背景。该图像也应该使用jframe调整大小。怎么做?
Java: maintaining aspect ratio of JPanel background image
How to set a background picture in JPanel
How do I resize images inside an application when the application window is resized?
在您的未来,我看到许多搜索和研究。