- #1
Nylex
- 552
- 2
Hi, I'm working through the "Building an Application: Part 2: Introduction to Inheritance, Panels, and Layouts" on java.sun.com and the code I've written compiles fine, but the images that are supposed to appear in the JPanel aren't there.
and
are where images are used.
The image files do exist. They're in a folder called "images", which itself is in a folder named "divelog". The whole code for the file is here, although obviously this class is used in another.
If anyone can help, thanks.
Code:
jl = new JLabel("Java Technology Dive Log", new ImageIcon("images/diveflag.gif"), JLabel.CENTER);
and
Code:
diver = new JLabel("", new ImageIcon("images/diver.jpg"), JLabel.CENTER);
are where images are used.
The image files do exist. They're in a folder called "images", which itself is in a folder named "divelog". The whole code for the file is here, although obviously this class is used in another.
If anyone can help, thanks.
Last edited: