@cadrose You should load your images into your panels within on init, not within the paint routine. The paint routine is continually fired every time the UI refreshes, on init only happens once, and the images only need to be loaded once.
Then you should refactor your code a little so you are using a single paint routine for all the panels - since they are all doing exactly the same thing there's no need to duplicate the code.