JTextArea not working

hi, I have a problem whereby the text area does not append the sentence "File not available" when there's no filename"myfile.pps" in the"f " drive folder. can i know what's wrong with the code i did below?

publicvoid create(){

final JTextArea ta =new JTextArea(10,20);

ta.append("Searching USB disk drive\n\n");

final File f =new File("F://");

String filename ="f:\\myfile.pps";

if(f.exists()){

ta.append("Drive inserted!\n");

try{

Runtime.getRuntime().exec(new String[]{"cmd","/c","start","f:\\myfile.pps"});

}

catch (Exception x){

x.printStackTrace();

}

catch (Error r){

e.printStackTrace();

}

if(filename!="f:\\myfile.pps"){

ta.append("File not available!\n");

}

}

else{

ta.append("Detection failed!\n");

}

}

thanks alot,

jp

[2043 byte] By [juniorprogrammera] at [2007-11-27 8:17:19]
# 1
Are you updating/repainting/revalidating/whatever (why not ask in the Swing forum?) the component after the chainge?
CeciNEstPasUnProgrammeura at 2007-7-12 20:02:29 > top of Java-index,Java Essentials,Java Programming...