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 matched to the content with using layouts?
Invoke pack after the jlabel content change.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With