I'm trying to arrange and scale some elements inside a table and I need to know the Table's height in order to achieve all that. The problem is that whenever I try to get its height it always returns 0 even though the table is obviously on the screen and has a definite size. Why is that?
table_height = table.getHeight();
I suggest you to use the method pack() on the table before calling getHeight(). This will set your table its height and width.
table.pack();
table_height = table.getHeight();
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