public boolean writePageToZipFile() {

		Frame frame = JOptionPane.getFrameForComponent(this);
		FileFilter filter = FileFilterFactory.getFilter("zip");
		fileChooser.setAcceptAllFileFilterUsed(false);
		fileChooser.addChoosableFileFilter(filter);
		fileChooser.setDialogType(JFileChooser.SAVE_DIALOG);
		String s = Modeler.getInternationalText("CompressPage");
		fileChooser.setDialogTitle(s != null ? s : "Compress current page to file");
		fileChooser.setApproveButtonMnemonic('S');
		String latestPath = fileChooser.getLastVisitedPath();
		if (latestPath != null)
			fileChooser.setCurrentDirectory(new File(latestPath));
		fileChooser.setAccessory(null);
		try {
			fileChooser.setSelectedFile(new File(fileChooser.getCurrentDirectory(), FileUtilities.changeExtension(FileUtilities.getFileName(pageAddress), "zip")));
		} catch (NullPointerException e) {
			e.printStackTrace();
			fileChooser.resetTextField();
		}

		if (fileChooser.showSaveDialog(frame) == JFileChooser.APPROVE_OPTION) {

			File file = new File(FileUtilities.fileNameAutoExtend(filter, fileChooser.getSelectedFile()));
			if (!validateFileName(file)) {
				fileChooser.resetChoosableFileFilters();
				return false;
			}
			if (file.exists()) {
				s = Modeler.getInternationalText("FileExists");
				if (JOptionPane.showConfirmDialog(frame, "Zip file " + file.getName() + " exists, overwrite?\n\n" + "WARNING: The old files contained in the existing zip\n" + "file will be deleted if you choose to overwrite.", s != null ? s : "File exists", JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) {
					fileChooser.resetChoosableFileFilters();
					return false;
				}
			}

			String filename = FileUtilities.getFileName(file.getAbsolutePath());
			final File zipDir = new File(fileChooser.getCurrentDirectory(), FileUtilities.removeSuffix(filename));
			zipDir.mkdir();

			ZipOutputStream zipOut = null;
			try {
				/*
				 * NOTE!!! "append" does not seem to work: while the new zip entries can be successfully added, the old ones become invisible and unrestorable by ZIP, though they still count for the zip file's size. This is believed to caused by the fact that Java's zip implementation is not random-access.
				 */
				zipOut = new ZipOutputStream(new FileOutputStream(file, false));
			} catch (IOException e) {
				e.printStackTrace();
			}

			if (!isWriting() && zipOut != null) {
				final ZipOutputStream zos = zipOut;
				final String oldAddress = pageAddress;
				new SwingWorker("Page Compressor") {
					public Object construct() {
						synchronized (lock) {
							zipPage(zos, zipDir);
						}
						return null;
					}

					public void finished() {
						isWriting = false;
						setAddress(oldAddress);
					}
				}.start();
			}
			fileChooser.rememberPath(fileChooser.getCurrentDirectory().toString());

		}

		fileChooser.resetChoosableFileFilters();
		return true;

	}