Results 1 to 2 of 2
Thread: Add Image to JPanel
- 08-12-2009, 01:33 PM #1Member
- Join Date
- Aug 2009
- Rep Power
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.
Last edited by Fubarable; 08-12-2009 at 02:11 PM.
- By IHateNetbeans in forum New To JavaReplies: 1Last Post: 04-30-2009, 07:06 PM
- By waqasdaar in forum AWT / SwingReplies: 0Last Post: 03-22-2009, 12:11 AM
- By masa in forum AWT / SwingReplies: 1Last Post: 03-02-2009, 08:36 AM
- By ankitmcgill in forum New To JavaReplies: 5Last Post: 11-02-2008, 06:41 AM
- By archanajathan in forum Advanced JavaReplies: 0Last Post: 01-08-2008, 05:29 PM