Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FileChooser question

 
Agapios Hartzoulakis
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm a newbie in Java and I would like some help... I'm using a filechooser and I have two questions.
1) how can I make it show the details of the files by default (now I have to click on the apropriate icon)
2) I would like to be able to see (or at least to get them somehow) the creation date of a file. All i can see now is the last modified date.
Thanks in advance, Any help will be much appreciated.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like you can by


You can customize this file view by creating a custom subclass of FileView (in the API reference documentation) and using an instance of the class as an argument to setFileView.


So you subclass the FileView and implement the getName method. This takes a File object which you can use to get the information you want to show. But it looks like that can only get the last modified date and not the create date.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic