completed the panel example with resize handler