强制MigLayout像GridBagLayout一样缩小隐藏对象 [英] Force MigLayout shrink like GridBagLayout for hidden Objects

查看:96
本文介绍了强制MigLayout像GridBagLayout一样缩小隐藏对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将GridBagLayout替换为MigLayout.问题是,如果我为GridBaglayout中的某个对象调用obj.setVisible(false),则布局会缩小.但是在MigLayout中,它只是保持隐藏状态.您知道使MigLayoutGridBagLayout一样起作用的方法吗?

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?

推荐答案

在此处查看MigLayout备忘单上的"hidemode"属性:

Have a look at the "hidemode" property on the MigLayout Cheat Sheet over here:

http://www.migcalendar.com/miglayout/cheatsheet.html

您可能想要new MigLayout("hidemode 3")

这篇关于强制MigLayout像GridBagLayout一样缩小隐藏对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆