Michael Dunn wrote:none of the code you posted has anything to do with the stated problem.
Well the rest of it is other methods that either create JPanels, or appends them to the JFrame itself. As they are working I omitted them for brevity (and I doubt anyone wants to look at a wall of code).
Michael Dunn wrote:things you might try
- search this forum and google keywords
Been there, done that. Even got the tshirt! :D
Michael Dunn wrote:
JLabel ImageIcon
you should find plenty of sample code re loading an image into a JLabel, then adding that to a parent container
- this forum's main page has a Swing FAQ link, with one of the topics being BackgroundImageOnJPanel,
this'll show you how to draw an image
The Imageicon one is one that Iv'e tried with no success. Same with the forum example (good suggestion btw). So far the closest that I've gotten was being able to have a 1x1 square within the JPanel itself with the following code.
the sample.jpg image is in the same folder as the src files for reference.