Force MigLayout shrink like GridBagLayout for hidden Objects

自古美人都是妖i 提交于 2019-12-10 15:05:09

问题


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?


回答1:


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")



来源:https://stackoverflow.com/questions/7190358/force-miglayout-shrink-like-gridbaglayout-for-hidden-objects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!