944,029 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 57958
  • Java RSS
Sep 3rd, 2004
1

How to insert an image into a GUI?

Expand Post »
Does anyone know how to insert a .jpeg into the JPanel of a GUI window?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
axiss is offline Offline
15 posts
since Aug 2004
Sep 3rd, 2004
0

Re: How to insert an image into a GUI?

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

I hope this helps you

Yours Sincerely

Richard West
Reputation Points: 25
Solved Threads: 10
Practically a Master Poster
freesoft_2000 is offline Offline
623 posts
since Jun 2004
Sep 4th, 2004
0

Re: How to insert an image into a GUI?

You can read about multimedia in java.sun.com... Anywayz I give you the base idea:
Java Syntax (Toggle Plain Text)
  1. ImageIcon image = new ImageIcon("image.jpeg");
  2. jpanel.add(image, BorderLayout.North);
Team Colleague
Reputation Points: 45
Solved Threads: 56
Unauthenticated Liar
nanosani is offline Offline
1,767 posts
since Jul 2004
Mar 22nd, 2010
0

king

this is waste webpage !!! NO INFORMATION AND NO VALID THUUUU
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pillaiyar is offline Offline
1 posts
since Mar 2010
May 26th, 2010
0
Re: How to insert an image into a GUI?
ImageIcon image = new ImageIcon("image.jpeg");
jpanel.add(image, BorderLayout.North);
Reputation Points: 10
Solved Threads: 0
Newbie Poster
waqas shah is offline Offline
1 posts
since May 2010
Oct 14th, 2010
0
Re: How to insert an image into a GUI?
Image images=new ImageIcon("Naruto.jpeg");
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kei_near is offline Offline
1 posts
since Oct 2010
Oct 14th, 2010
0
Re: How to insert an image into a GUI?
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.)
Featured Poster
Reputation Points: 1924
Solved Threads: 952
Posting Expert
JamesCherrill is online now Online
5,795 posts
since Apr 2008
Mar 5th, 2011
0
Re: How to insert an image into a GUI?
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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
HappyCat123 is offline Offline
5 posts
since Mar 2011

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Project topic
Next Thread in Java Forum Timeline: Changing components





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC