How to get real JPanel Size?

Yoda picture Yoda · Aug 17, 2012 · Viewed 35.3k times · Source

How should I get real JPanel size in JFrame?

Answer

Garrett Hall picture Garrett Hall · Aug 17, 2012

The size will be 0,0 until it is displayed because the components and layout are not calculated beforehand.