A couple of problems/questions here:
1. If this is really an "applet"...
... then it's executing on the *client's* PC...
... and the client won't necessarily have an "images/" directory.
2. You're assuming that the Java program's working directory is "/root/user". This *isn't* necessarily true.
Put a debug statement in your code:
String dir = System.getProperty("user.dir");
Once you know what the *actual* directory is, see if relative paths now work (e.g. "../images/1.jpg" instead of "images/1.jpg).
'Hope that helps .. PSM
Here's code for reading a local file from a Java applet: