public static void load()
    {// Create the data objects for us to restore.

        // Wrap all in a try/catch block to trap I/O errors.
        try
        {

            if (!FILE.exists())
            {
                FILE.createNewFile();
                updateFlights();
                save();
            }           

            // Open file to read from, named SavedObjects.sav.
            FileInputStream file = new FileInputStream(db);
            // Create an ObjectInputStream to get objects from load file.
            ObjectInputStream load = new ObjectInputStream(file);
            // Now we do the restore.
            // readObject() returns a generic Object, we cast those back
            // into their original class type.
            // For primitive types, use the corresponding reference class.
            flightList = (ArrayList<Flight>) load.readObject();
       
            // Close the file.
            load.close(); // This also closes loadFile.
            save();
            updateFlights();
        }
        catch(Exception exc)
        {
            exc.printStackTrace(); // If there was an error, print the info.
        }

        // All done.
    }