Results 1 to 2 of 2
Thread: Add Image to JPanel
- 08-12-2009, 01:33 PM #1
Member
- Join Date
- Aug 2009
- Posts
- 1
- Rep Power
- 0
Add Image to JPanel
Hi,
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.
Similar Threads
-
Image appear at random co-ord within jpanel
By IHateNetbeans in forum New To JavaReplies: 1Last Post: 04-30-2009, 07:06 PM -
How to display image from byte array in JPANEL
By waqasdaar in forum AWT / SwingReplies: 0Last Post: 03-22-2009, 12:11 AM -
how to set image to a jpanel
By masa in forum AWT / SwingReplies: 1Last Post: 03-02-2009, 08:36 AM -
n00b : Ghost image while using mouseDragged event to move a filled jPanel
By ankitmcgill in forum New To JavaReplies: 5Last Post: 11-02-2008, 06:41 AM -
Converting multiple banded image into single banded image... Image enhancement
By archanajathan in forum Advanced JavaReplies: 0Last Post: 01-08-2008, 05:29 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks