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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.