public Archive getSelectedArchive() {
		if (showOpenDialog(component) == 0) {
			File selectedFile = getSelectedFile();
			if (selectedFile.getName().endsWith(".class"))
				return new ClassFile(selectedFile);
			else
				try {
					return new JavaArchive(new JarFile(selectedFile));
				} catch (IOException e) {
					e.printStackTrace();
				}
		}
		return null;
	}