private Component makeDialogComponents()
	{
		JPanel panel = new JPanel();
		panel.setLayout(new BorderLayout());
		_cards = new JPanel();
		_cards.setLayout(new CardLayout());
		panel.add(_cards, BorderLayout.CENTER);

		// Make first card for field selection and delimiter
		JPanel firstCard = new JPanel();
		firstCard.setLayout(new BoxLayout(firstCard, BoxLayout.Y_AXIS));
		JPanel tablePanel = new JPanel();
		tablePanel.setLayout(new BorderLayout());
		_table = new JTable();
		_table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		// Enclose table in a scrollpane to prevent other components getting lost
		JScrollPane scrollPane = new JScrollPane(_table);
		_table.setPreferredScrollableViewportSize(new Dimension(300, 150));
		tablePanel.add(scrollPane, BorderLayout.CENTER);

		// Make a panel to hold the table and up/down buttons
		JPanel fieldsPanel = new JPanel();
		fieldsPanel.setLayout(new BorderLayout());
		fieldsPanel.add(tablePanel, BorderLayout.CENTER);
		JPanel updownPanel = new JPanel();
		updownPanel.setLayout(new BoxLayout(updownPanel, BoxLayout.Y_AXIS));
		_moveUpButton = new JButton(I18nManager.getText("button.moveup"));
		_moveUpButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e)
			{
				int row = _table.getSelectedRow();
				if (row > 0)
				{
					_model.swapItems(row, row - 1);
					_table.setRowSelectionInterval(row - 1, row - 1);
				}
			}
		});
		_moveUpButton.setEnabled(false);
		updownPanel.add(_moveUpButton);
		_moveDownButton = new JButton(I18nManager.getText("button.movedown"));
		_moveDownButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e)
			{
				int row = _table.getSelectedRow();
				if (row > -1 && row < (_model.getRowCount() - 1))
				{
					_model.swapItems(row, row + 1);
					_table.setRowSelectionInterval(row + 1, row + 1);
				}
			}
		});
		_moveDownButton.setEnabled(false);
		updownPanel.add(_moveDownButton);
		fieldsPanel.add(updownPanel, BorderLayout.EAST);
		// enable/disable buttons based on table row selection
		_toggler = new UpDownToggler(_moveUpButton, _moveDownButton);
		_table.getSelectionModel().addListSelectionListener(_toggler);

		// Add fields panel and the delimiter panel to first card in pack
		JLabel saveOptionsLabel = new JLabel(I18nManager.getText("dialog.save.fieldstosave"));
		saveOptionsLabel.setAlignmentX(JLabel.LEFT_ALIGNMENT);
		firstCard.add(saveOptionsLabel);
		fieldsPanel.setAlignmentX(JPanel.LEFT_ALIGNMENT);
		firstCard.add(fieldsPanel);
		firstCard.add(Box.createRigidArea(new Dimension(0,10)));

		// delimiter panel
		JLabel delimLabel = new JLabel(I18nManager.getText("dialog.delimiter.label"));
		delimLabel.setAlignmentX(JLabel.LEFT_ALIGNMENT);
		firstCard.add(delimLabel);
		JPanel delimsPanel = new JPanel();
		delimsPanel.setLayout(new GridLayout(0, 2));
		delimsPanel.setAlignmentX(JPanel.LEFT_ALIGNMENT);
		// radio buttons
		_delimiterRadios = new JRadioButton[5];
		_delimiterRadios[0] = new JRadioButton(I18nManager.getText("dialog.delimiter.comma"));
		delimsPanel.add(_delimiterRadios[0]);
		_delimiterRadios[1] = new JRadioButton(I18nManager.getText("dialog.delimiter.tab"));
		delimsPanel.add(_delimiterRadios[1]);
		_delimiterRadios[2] = new JRadioButton(I18nManager.getText("dialog.delimiter.semicolon"));
		delimsPanel.add(_delimiterRadios[2]);
		_delimiterRadios[3] = new JRadioButton(I18nManager.getText("dialog.delimiter.space"));
		delimsPanel.add(_delimiterRadios[3]);
		JPanel otherPanel = new JPanel();
		otherPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
		_delimiterRadios[4] = new JRadioButton(I18nManager.getText("dialog.delimiter.other"));
		otherPanel.add(_delimiterRadios[4]);
		_otherDelimiterText = new JTextField(new OneCharDocument(), null, 2);
		otherPanel.add(_otherDelimiterText);
		// Group radio buttons
		ButtonGroup delimGroup = new ButtonGroup();
		for (int i=0; i<_delimiterRadios.length; i++)
		{
			delimGroup.add(_delimiterRadios[i]);
		}
		delimsPanel.add(otherPanel);
		firstCard.add(delimsPanel);

		// header checkbox
		firstCard.add(Box.createRigidArea(new Dimension(0,10)));
		_headerRowCheckbox = new JCheckBox(I18nManager.getText("dialog.save.headerrow"), true);
		firstCard.add(_headerRowCheckbox);
		_cards.add(firstCard, "card1");

		// Second card
		JPanel secondCard = new JPanel();
		secondCard.setLayout(new BorderLayout());
		JPanel secondCardHolder = new JPanel();
		secondCardHolder.setLayout(new BoxLayout(secondCardHolder, BoxLayout.Y_AXIS));
		// point type selector
		secondCardHolder.add(Box.createRigidArea(new Dimension(0,10)));
		_pointTypeSelector = new PointTypeSelector();
		_pointTypeSelector.setAlignmentX(JLabel.LEFT_ALIGNMENT);
		secondCardHolder.add(_pointTypeSelector);
		JLabel coordLabel = new JLabel(I18nManager.getText("dialog.save.coordinateunits"));
		coordLabel.setAlignmentX(JLabel.LEFT_ALIGNMENT);
		secondCardHolder.add(coordLabel);
		JPanel coordsUnitsPanel = new JPanel();
		coordsUnitsPanel.setBorder(BorderFactory.createEtchedBorder());
		coordsUnitsPanel.setLayout(new GridLayout(0, 2));
		_coordUnitsRadios = new JRadioButton[4];
		_coordUnitsRadios[0] = new JRadioButton(I18nManager.getText("units.original"));
		_coordUnitsRadios[1] = new JRadioButton(I18nManager.getText("units.degminsec"));
		_coordUnitsRadios[2] = new JRadioButton(I18nManager.getText("units.degmin"));
		_coordUnitsRadios[3] = new JRadioButton(I18nManager.getText("units.deg"));
		ButtonGroup coordGroup = new ButtonGroup();
		for (int i=0; i<4; i++)
		{
			coordGroup.add(_coordUnitsRadios[i]);
			coordsUnitsPanel.add(_coordUnitsRadios[i]);
			_coordUnitsRadios[i].setSelected(i==0);
		}
		coordsUnitsPanel.setAlignmentX(JPanel.LEFT_ALIGNMENT);
		secondCardHolder.add(coordsUnitsPanel);
		secondCardHolder.add(Box.createRigidArea(new Dimension(0,7)));
		// altitude units
		JLabel altUnitsLabel = new JLabel(I18nManager.getText("dialog.save.altitudeunits"));
		altUnitsLabel.setAlignmentX(JLabel.LEFT_ALIGNMENT);
		secondCardHolder.add(altUnitsLabel);
		JPanel altUnitsPanel = new JPanel();
		altUnitsPanel.setBorder(BorderFactory.createEtchedBorder());
		altUnitsPanel.setLayout(new GridLayout(0, 2));
		_altitudeUnitsRadios = new JRadioButton[3];
		_altitudeUnitsRadios[0] = new JRadioButton(I18nManager.getText("units.original"));
		_altitudeUnitsRadios[1] = new JRadioButton(I18nManager.getText("units.metres"));
		_altitudeUnitsRadios[2] = new JRadioButton(I18nManager.getText("units.feet"));
		ButtonGroup altGroup = new ButtonGroup();
		for (int i=0; i<3; i++)
		{
			altGroup.add(_altitudeUnitsRadios[i]);
			altUnitsPanel.add(_altitudeUnitsRadios[i]);
			_altitudeUnitsRadios[i].setSelected(i==0);
		}
		altUnitsPanel.setAlignmentX(JPanel.LEFT_ALIGNMENT);
		secondCardHolder.add(altUnitsPanel);
		secondCardHolder.add(Box.createRigidArea(new Dimension(0,7)));
		// Selection of format of timestamps
		JLabel timestampLabel = new JLabel(I18nManager.getText("dialog.save.timestampformat"));
		timestampLabel.setAlignmentX(JLabel.LEFT_ALIGNMENT);
		secondCardHolder.add(timestampLabel);
		JPanel timestampPanel = new JPanel();
		timestampPanel.setBorder(BorderFactory.createEtchedBorder());
		timestampPanel.setLayout(new GridLayout(0, 2));
		_timestampUnitsRadios = new JRadioButton[3];
		_timestampUnitsRadios[0] = new JRadioButton(I18nManager.getText("units.original"));
		_timestampUnitsRadios[1] = new JRadioButton(I18nManager.getText("units.default"));
		_timestampUnitsRadios[2] = new JRadioButton(I18nManager.getText("units.iso8601"));
		ButtonGroup timeGroup = new ButtonGroup();
		for (int i=0; i<3; i++)
		{
			timeGroup.add(_timestampUnitsRadios[i]);
			timestampPanel.add(_timestampUnitsRadios[i]);
			_timestampUnitsRadios[i].setSelected(i==0);
		}
		timestampPanel.setAlignmentX(JPanel.LEFT_ALIGNMENT);
		secondCardHolder.add(timestampPanel);
		secondCard.add(secondCardHolder, BorderLayout.NORTH);
		_cards.add(secondCard, "card2");

		// Put together with ok/cancel buttons on the bottom
		JPanel buttonPanel = new JPanel();
		buttonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
		_backButton = new JButton(I18nManager.getText("button.back"));
		_backButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e)
			{
				CardLayout cl = (CardLayout) _cards.getLayout();
				cl.previous(_cards);
				_backButton.setEnabled(false);
				_nextButton.setEnabled(true);
			}
		});
		_backButton.setEnabled(false);
		buttonPanel.add(_backButton);
		_nextButton = new JButton(I18nManager.getText("button.next"));
		_nextButton.setEnabled(true);
		_nextButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e)
			{
				CardLayout cl = (CardLayout) _cards.getLayout();
				cl.next(_cards);
				_backButton.setEnabled(true);
				_nextButton.setEnabled(false);
			}
		});
		buttonPanel.add(_nextButton);
		JButton okButton = new JButton(I18nManager.getText("button.finish"));
		okButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e)
			{
				if (saveToFile())
				{
					_dialog.dispose();
				}
			}
		});
		buttonPanel.add(okButton);
		JButton cancelButton = new JButton(I18nManager.getText("button.cancel"));
		cancelButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e)
			{
				_dialog.dispose();
			}
		});
		buttonPanel.add(cancelButton);
		panel.add(buttonPanel, BorderLayout.SOUTH);
		return panel;
	}