lastmodified date
public void choosefile() {
JFileChooser fc = new JFileChooser();
int result = fc.showOpenDialog(null);
if (result == JFileChooser.CANCEL_OPTION)
JOptionPane.showMessageDialog(null, "Operation cancelled");
else {
File filename = fc.getSelectedFile();
String s = "Name: " + filename.getName() + "\n" +
"Path: " + filename.getPath() + "\n" +
"Parent:" + filename.getParent() + "\n" +
"Length:" + filename.length() + "\n" +
"Can Read: " + filename.canRead()+ "\n" +
"Can Write: " + filename.canWrite() + "\n" +
"Last Modified: " + filename.lastModified();
txtArea.setText(s);
}
}
Above are my methods for choosing the file and thenon displaying its various properties
Below are my results:
Name: xuweiliangvictor.jpg
Path: D:\xuweiliangvictor.jpg
Parent:D:\
Length:12512
Can Read: true
Can Write: true
Last Modified: 1177514242366
May I know how could I display the last modified date as : DayofWeek Month Day Time Zone Year?
Like Thu Apr 10 12:17:04 SGT 2003
Many many thanks in advance :)

