954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to insert an image into a GUI?

Does anyone know how to insert a .jpeg into the JPanel of a GUI window?

axiss
Newbie Poster
15 posts since Aug 2004
Reputation Points: 10
Solved Threads: 0
 

hi everyone,
See this thread below
http://www.daniweb.com/techtalkforums/thread10088.html

I hope this helps you

Yours Sincerely

Richard West

freesoft_2000
Practically a Master Poster
623 posts since Jun 2004
Reputation Points: 25
Solved Threads: 10
 

You can read about multimedia in java.sun.com... Anywayz I give you the base idea:

ImageIcon image = new ImageIcon("image.jpeg");
jpanel.add(image, BorderLayout.North);
nanosani
Unauthenticated Liar
Team Colleague
1,830 posts since Jul 2004
Reputation Points: 45
Solved Threads: 56
 

this is waste webpage !!! NO INFORMATION AND NO VALID THUUUU

pillaiyar
Newbie Poster
1 post since Mar 2010
Reputation Points: 10
Solved Threads: 0
 

ImageIcon image = new ImageIcon("image.jpeg");
jpanel.add(image, BorderLayout.North);

waqas shah
Newbie Poster
1 post since May 2010
Reputation Points: 10
Solved Threads: 0
 

Image images=new ImageIcon("Naruto.jpeg");

kei_near
Newbie Poster
1 post since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

Do you want to have the image as just one of the components in the panel, or do you want the image to fill the panel as the background for all the components in the panel? (Because these two have different solutions.)

JamesCherrill
Posting Genius
Moderator
6,370 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
 

I'm looking for basically the same thing, except in my case I am looking for the jpeg to fill the panel as a background, how would I do this?

HappyCat123
Newbie Poster
5 posts since Mar 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You