开发者

How to set maximum JPanel width but to stay height free to grow?

How to set maximum JPanel width but to stay height free to grow ? ( I can开发者_开发问答not use prefferedSize for strange reason ).


Use LayoutManagers. BoxLayout, GridBagLayout, or some other layout will allow you to define a single direction of growth for a panel.


One possibility is use MigLayout http://www.miglayout.com/
There you can easily override minimal:prefered:maximal size. And mainly it works properly.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜