我正在尝试用 MigLayout
替换 GridBagLayout
。问题是,如果我为 GridBaglayout
中的某个对象调用 obj.setVisible(false)
,布局会缩小。但在 MigLayout
中,它只是保持隐藏状态。你知道一些让 MigLayout
表现得像 GridBagLayout
的方法吗?
最佳答案
查看此处 MigLayout 备忘单上的“hidemode”属性:
http://www.migcalendar.com/miglayout/cheatsheet.html
你可能想要 new MigLayout("hidemode 3")
关于java - Force MigLayout shrink like GridBagLayout for hidden Objects,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7190358/