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

Recommended Answers

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

I hope this helps you

Yours Sincerely

Richard West

Jump to Post

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);
Jump to Post

All 7 Replies

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);

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

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

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

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.)

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.