开发者

MigLayout, disable JButton width resize

开发者 https://www.devze.com 2023-03-28 22:44 出处:网络
I have a button layout something like this But the problem is Text 1 andText 2 is changing dynamically which screw up the whole button layout. For example, if the Text 2 become longer than the butt

I have a button layout something like this

MigLayout, disable JButton width resize

But the problem is Text 1 and Text 2 is changing dynamically which screw up the whole button layout. For example, if the Text 2 become longer than the buttons are resized soemthing like this

MigLayout, disable JButton width resize

How can I prevent this and keep the button width same for both I am using MigLayou开发者_StackOverflow社区t. Also any Text is not that much longer which can not be fit inside the button.


Most likely, set your layout as MigLayout("", "[grow, fill][grow, fill]", "[]")

(Set both columns to grow and fill.)

However, if you post as SSCCE, it'll be easier (for us) to test it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号