sets the component size
The method is used in the inner logic and not intended for direct use. To set a new size, please define new width, height values and call the resize method.