开发者

how to dynamically increase JDialog size in swing?

开发者 https://www.devze.com 2023-01-27 15:24 出处:网络
I have a JDialog and inside it am having a JLabel in which the contents are added dynamically. Initially I set the size of the JDialog and JLabel (both having same size), now if my contents in the JLa

I have a JDialog and inside it am having a JLabel in which the contents are added dynamically. Initially I set the size of the JDialog and JLabel (both having same size), now if my contents in the JLabel exceeds the size of the JDialog, the content is not visible.

How can i dynamically change the size of the JDialog so that the size gets ma开发者_开发知识库tched to the content with using layouts?


Invoke pack after the jlabel content change.

0

精彩评论

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