FYI, it is generally not a good idea to use file system paths in your 
application code, since this can easily change from system to system. You 
should include the image resources in your JAR and load them from the 
classpath. For example:

ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
Image flagGreen = Image.load(classLoader.getResource("images/green.png"));

On Nov 22, 2010, at 4:20 AM, MSafiri wrote:

> 
> Dear Greg,
> 
> I am uploading the .java file, which is causing the problem.
> 
> This is the way we declare the Image:
> 
>               Image flagGreen = Image.load(new URL("file:///C:/green.png"));
>               Image flagRed = Image.load(new URL("file:///C:/red.png"));
> 
> This part is putting the flag to the column, based on the calculation:
> 
>       
> if(isDateOutOfThresoldRange(dateFormat.format(currentValues.get(MessageDataDef.progress_start))
> + "", 
>                               
> dateFormat.format(newValues.get(MessageDataDef.progress_start)) + "")){
>                       mapStartDate.put("trend", flagRed);
>               }else{
>                       mapStartDate.put("trend", flagGreen);
>               }
> 
> You can see all the code in the attached file.
> 
> Thanks alot for your help,
> 
> MSafiri
> http://apache-pivot-users.399431.n3.nabble.com/file/n1944528/DialogProgressUpdateConfirmation.java
> DialogProgressUpdateConfirmation.java 
> -- 
> View this message in context: 
> http://apache-pivot-users.399431.n3.nabble.com/Data-for-trend-is-not-an-instance-of-org-apache-pivot-wtk-media-Image-tp1930922p1944528.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Reply via email to