Hi,
How to get the size of a window or frame?
Should be trivial - just use getSize or getWidth or getHeight. Actually
it is not :(
class MainWindow extends Window {
void openSubFrame() {
Frame frame = .... // load frame from BXML or whatever
int width = frame.getWidth(); // returns 0
frame.open(this);
width = frame.getWidth(); // still 0
}
}
After some time, when the frame is rendered on the screen, the getWidth
returns the actual width.
So, how to get the size of the frame before it is displayed? I want to
apply some custom positioning of frames and I have to know their size.
Regards,
Piotr
--
Piotr Kołaczkowski
senior consultant
Sages Sp. z o.o.
ul. Wąwozowa 11
02-796 Warszawa
t: +48 22 2035600
f: +48 22 2035601
m: +48 609618449