Originally posted by Daniel Simpson:
At first, I hardcoded the database file cookie value in my source code but then I decided that it was a bad idea, because then that limits my application to only being used by my specific database. Therefore, I rethought my decision and I made a custom FileFilter so that it only allows users to select a file with a .db extension. If for some reason there is a file with a .db extension and it isn't the expected database file, somewhere along reading in the schema an IOException will be caught and rethrown. That is how I decided to implement it.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton