add panel resize handler