updated ImagePanel to support Image class