1 2 import java.awt.*; 3 import java.awt.event.*; 4 import javax.swing.*; 5 import java.io.*; 6 7 void jButton1_actionPerformed(ActionEvent e) { 8 9 boolean success = (new File("c:\\test1.txt")).exists(); 10 11 if (success == false) { 12 this.setTitle("File Do NOT Exists!"); 13 } 14 else { 15 this.setTitle("File Exists!"); 16 } 17 }