Moved panel resize logic into panel.
Merge pull request #148 from tsherif/panel-resize

Moved panel resize logic into panel.