强制 MigLayout 像 GridBagLayout 一样收缩隐藏对象
我正在尝试将 GridBagLayout 替换为 MigLayout。问题是,如果我为 GridBaglayout 中的某个对象调用 obj.setVisible(false) ,布局就会缩小。但在 MigLayout
中它只是保持隐藏状态。您知道如何使 MigLayout
表现得像 GridBagLayout
吗?
I am trying to replace GridBagLayout
with MigLayout
. The problem is that if i call obj.setVisible(false)
for some object in GridBaglayout
, the layout shrinks. But in MigLayout
it just remains hidden. Do you know some way to make MigLayout
acting like GridBagLayout
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这里查看 MigLayout Cheat Sheet 上的“hidemode”属性:
http://www.miglayout.com/miglayout/cheatsheet.html migcalendar.com/miglayout/cheatsheet.html
您可能需要
new MigLayout("hidemode 3")
Have a look at the "hidemode" property on the MigLayout Cheat Sheet over here:
http://www.migcalendar.com/miglayout/cheatsheet.html
You probably want
new MigLayout("hidemode 3")