I thought that, but there's no setWidth() function. You have to either use setSize(), as I do, or set the width/height in the constructor, which only accepts ints and getHeight() returns a double.
Having said that, I can probably just set the property direct, rather than use a setter. I'll have a play with doing that