There is a "image File" property for user to select image file from your local file system.
It will use image file in _data/reset1.gif if the value for "image File"  is "./_data/reset1.gif"

You can define a String in EJS variable panel.
e.g. Name=image, type=String, Initial value="./_data/reset1.gif"
then assign value for "image File" as  "%image%"
EJS will find value from "image" and load the file.

You can change value of "image" with java code.
[code]
e.g. If (x>10 ) image="./_data/reset1.gif";
else image="./_data/reset2.gif";
[/code]
However, you will have to make sure both files are available.

You should add both files as "User files" from "Run option" panel. (check out attached file)


It is the same feature for property value in EJS GUI elements.
You can enter value or enter a variable name.?
However, for String type property, the value is a string, so variable name are enclosed by "%" pair.

For the attached jar file:The following code were used.
[code]
if(sodio){
    material = "photoelectric/sodio.gif";
    potencialcorte = 2.28;
}
else{
    material = "photoelectric/cesio.gif";
    potencialcorte = 2.1;
}
[/code]
and the image property was assigned with value="%material%"