Creating images and buttons in the paintComponent method is not the way to do it. If your code is being executed from a jar file you should be using resources not disk files.