更新时间:2023-12-05 22:18:52
如 如何使用分层窗格:在分层窗格中布置组件 ,尽管默认情况下分层窗格没有布局管理器,但是您仍然可以分配布局管理器到分层窗格."使用OverlayLayout
(见此处)来重叠面板.
As suggested in How to Use Layered Panes: Laying Out Components in a Layered Pane, "Although a layered pane has no layout manager by default, you can still assign a layout manager to the layered pane." Use OverlayLayout
, seen here, for overlapping panels.
或者,使用 JInternalFrame
,其中做允许您分别pack()
内部框架,如此处和
Alternatively, use JInternalFrame
, which does allow you to pack()
the internal frames individually, as shown here and here.