2

我的 Swing 应用程序的 GUI 是使用Window Builder ProGUI 编辑器构建的。使用的布局是MigLayoutAbsoluteLayout。应用程序是使用WindowsMachine 开发的,因此 UI 在 中对齐且整洁Windows,但是当我在 中运行相同的应用程序时Mac OS X,应用程序Frame无法容纳其内部的组件bounds。我的意思是,Components框架内部的大小会随着平台的变化而变化。当我提供额外的空间(增加帧边界)时,它看起来不错,Mac但在Windows. 有没有什么办法可以拥有FramePanel增长它的内容或Components.

4

2 回答 2

4

不要使用绝对布局。布局管理器精确地用于避免您面临的那种问题。

于 2012-01-31T08:24:01.580 回答
1

Assuming you used AbsoluteLayout because none of the existing layout managers suited your needs,

Have a look at Creating a Custom Layout Manager and use one instead of AbsoluteLayout.(Before that make sure none of the present layout managers suit your need)

于 2012-01-31T08:32:50.883 回答