Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
So i'm making this logo creator for my class. I have everything for my UI figured out, except for this problem. So basically my JPanel has a BorderLayout set to it. And for the center of that BorderLayout, I have another JPanel set ot a BorderLayout inside of the first one. At the center of that most inner-nested BorderLayout panel, I need to put an image. I really just don't know where to save my image to and how to get it on the screen. I'm using BlueJ, its what we use in this class, and no errors are appearing. But the image just doesn't show up.

What I have tried:

here's my current code for the section in which i'm trying to put the image into that panel...PLEASE HELP MEEEEE

ImageIcon image = new ImageIcon("bandanaMichealScott.jpg");
JLabel imageLabel = new JLabel(image);
imagePanel.add(imageLabel);
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900