public static File[] chooseFiles(JFrame frame, String Button, int mode) {
		JFileChooser jfc = new JFileChooser();
		jfc.setFileSelectionMode(mode);
		jfc.setMultiSelectionEnabled(false);
		jfc.setAcceptAllFileFilterUsed(true);

		int success = jfc.showDialog(frame, Button);
		if(success == JFileChooser.APPROVE_OPTION) {
			return jfc.getSelectedFiles();
		}
		return null;
	}