add resize canvas when onsize
take out main method
add panel widget and using it to test layout