Programmatically change a panel size

How can I change the width and height of a panel from inside my components?