import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; 1 2 3 void jButton1_actionPerformed(ActionEvent e) { 4 File file = new File("c:\\test1.txt"); 5 6 // Get the number of bytes in the file 7 long length = file.length(); 8 this.setTitle("Size of file " +(length/1024)+ " KB"); 9 }