Hey,
I am having trouble creating a valid URL source for a Icon, not sure if its something to do with the Classpath and where the JVM is looking for the jpeg file in the Imageicon constructor.
Icon pic = new ImageIcon(getClass().getResource("Me Passport Photo.jpg"));
label2 = new JLabel("Label 2 with text and Icon obj.", pic, SwingConstants.LEFT);
The JVM throws an exception when trying to source the jpeg.
The jpeg is actually on my desktop, I am using a Mac OS Lion.
Ps cant upload
java class and app files just yet as on a mobile.
Cheers
Ciaran