I think I finally figured out how to use paincomponent