开发者

Is there any way in Java to enforce a minimum window size?

Is there any way in Java to e开发者_如何学Gonforce a minimum window size?

The last article I can find is from 1999, and has some complicated code to mimic the behaviour... http://www.javaworld.com/javaworld/javaqa/1999-10/03-qa-window.html

Surely there is a simple method that can be used?


I usually set the minimum size of a window by setting the minimum sizes of the JComponents inside of the window.

jcomponent.setMinimumSize(Dimension d);

That line of code will limit a component's minimum size.

You can also call setMinimumSize() on the JFrame directly to achieve a similar effect.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜