I have a button that I want to disable as long as there isn\'t a specific number of files in a directory. Is there some kind of listener that notifies me at the moment a file i
There's no current native support in Java for file system events and monitoring. JNotify is a useful library for doing this. You should set it up to monitor the directory for modifications, and then determine yourself what's been added/removed.
Java 7 will have file system event support built into it.