Thank you George and Shinu,
For some unexplicable reason I looked everywhere in the Documentation and on the forums except the correct page.
I've now tried getWindowsBounds() and it seems to return the external dimensions of the window (i.e. including scroll bars, title bar and status bar). Looking into the properties of the object returned by the getContentFrame() method I found clientWidth and clientHeight. These seem to return the correct size of the content section of the window so I have ended up using these.