I need visual components to have a method that assesses their size

I need to do something like

Button signUp = new Button(Lang.getMessage("SIGN_UP"));
if(signUp.getWidth() < Cache.BUTTON_WIDTH)
			signUp.setWidth(Cache.BUTTON_WIDTH, Sizeable.UNITS_PIXELS);

but the width is not known at this time (it’s -1), so the above code doesn’t work.
The difference in width will occur when user changes internationalization prior to accessing this piece of code, and the length of the text in the button will vary.
I can tell it would be quite a pain to calculate the above length from text length, font, button component specifics etc.

Not really helping, but just wanted to point out a feature that I’ve been meaning to add to my CSS Tools add-on, which would make this sort of thing possible (query the rendered size of a component):

If I wouldn’t be some darn busy right now, I’d make this happen immediately, since it wouldn’t be too difficult.