=)) you're welcome
Type: Posts; User: Voodoo
=)) you're welcome
File fi = new File(path);
if (fi == null || !fi.exists()) return new ImageIcon(Bikes.class.getResource(path)); // web or Jar
else return new ImageIcon(path); // local folder
your path is invalid hence F is NULL and you end up with NullPointerException at the statement if (F.exists())
...tell me how the path looks like. Remember that java is CASE SENSITIVE and window isn't.
icocijan
Sure, you can access either from the web OR from a folder or from a JAR file. The code you wrote is good for a) web, b) Jar file you can circumvent the problem as following (access...