private void performOpen() {
		JFileChooser chooser = new JFileChooser(lastSave);
		chooser.setFileFilter(getFileFilter());
		chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
		chooser.showOpenDialog(this);
		File file = chooser.getSelectedFile();
		String errorMessage = null;
		if (file != null && file.isFile() && file.exists()) {
			try (FileInputStream fis = new FileInputStream(file);
					ObjectInputStream ois = new ObjectInputStream(fis)) {
				Object o = ois.readObject();
				if (o instanceof GameData) {
					GameData d = (GameData) o;

					gcp.setContents(d.general);
					scp.setContents(d.shop);
					lcp.setContents(d.levels);
					tcp.setContents(d.towers);
					ecp.setContents(d.enemies);
					pcp.setContents(d.projectiles);

					lastSave = file;
				} else {
					errorMessage = "The file does not contain valid game data.";
				}
			} catch (IOException ie) {
				errorMessage = "The file could not be read from the drive.";
			} catch (ClassNotFoundException e) {
				errorMessage = "The contents of the file are incompatible with this computer.";
			} finally {
				if (errorMessage != null) {
					JOptionPane.showMessageDialog(this, errorMessage, "Error",
							JOptionPane.ERROR_MESSAGE);
				}
			}
		}
	}