Java huśtawka get rama rozmiar ramki

Rectangle r = frame.getBounds();
int h = (int) r.getHeight();
int w = (int) r.getWidth();
Plat00n