Hi,
For issue #22, it would help very much if you can post the stack trace from the exception you're getting.
For issue #23, calling setSize works fine for me outside of the constructor in various applications, so I suspect that you might have something else going on in what I can only assume is other code you must have that exhibits some kind of unexpected behavior. The example as it stands doesn't actually draw anything so it's hard to use that as evidence of setSize not working...
Cheers,
Geoff