public static void save() {
        Configuration config = Configuration.loadConfiguration();
        // Find the directory to save to.
        File saveDirectory = new File(config.getProperty("savePath"));
        // If the directory doesn't exist, leave it.
        if (!saveDirectory.exists()) {
            String dialogMsg = "Cannot find the save directory! Please change your settings.";
            JOptionPane.showMessageDialog(null, dialogMsg, "SwiftSnap", JOptionPane.INFORMATION_MESSAGE);
            return;
        }
        
        // Write the screenshot image to the file and save it.
        String filename = "Screenshot_" + System.currentTimeMillis() + ".png";
        File pngFile = new File(config.getProperty("savePath") + "\\" + filename);
        try {
            pngFile.createNewFile();
            // Write the image as a PNG.
            ImageIO.write(lastScreenshot.getImage(), "png", pngFile);
            JOptionPane.showMessageDialog(null, "Successfully saved image to " + config.getProperty("savePath"), "SwiftSnap", JOptionPane.INFORMATION_MESSAGE);
        } catch (IOException ex) {
            System.err.println(ex.getMessage());
        }
    }