Add Image to JPanel
I'm pretty new to Java so bear with me ;)
I am looking for the simplest possible way to add a jpg image to display on a splash screen for a small game. The code I have been given uses JFrame to display the splash screen but also uses a graphics2D object to add items to the splash screen eg
Graphics2D os = canvas.getOffscreenGraphics();
os.drawString("Hold down a key depending on which limb(s) you want to move:", 100, 120);
os.drawString("A - Left Arm", 100, 135);
Basically just after the simplest way to add an image to the splash screen in the corner.
Help is much appreciated ;)
This link may prove helpful: JavaRanch - Background Image On J Panel
Please give the suggestion a try and feel free to come on back if it doesn't work fully for you.
Best of luck and welcome to the forum!
edit: moving this thread to the Swing forum for better topic alignment.