开发者

How to find real height of panel?

If I set the size of a JPanel by using for instance the method setPreferedSize(new Dimension(0,160,10,10)) but then I add a lot o开发者_JAVA百科f other components (for instance a series of big buttons) and the panel exceeds the size of 160px: how do I find the real height of panel ?


Use JComponent#getHeight(). From its JavaDoc: Returns the current height of this component.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜