MigLayout, disable JButton width resize
I have a button layout something like this
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
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.
精彩评论