Index: /src/org/openstreetmap/josm/gui/PreferenceDialog.java
===================================================================
--- /src/org/openstreetmap/josm/gui/PreferenceDialog.java	(revision 84)
+++ /src/org/openstreetmap/josm/gui/PreferenceDialog.java	(revision 85)
@@ -57,5 +57,9 @@
 			super(UIManager.getString("OptionPane.okButtonText"), 
 					UIManager.getIcon("OptionPane.okIcon"));
-			putValue(MNEMONIC_KEY, new Integer((String)UIManager.get("OptionPane.okButtonMnemonic")));
+			try {
+				putValue(MNEMONIC_KEY, new Integer((String)UIManager.get("OptionPane.okButtonMnemonic")));
+			} catch (NumberFormatException e) {
+				// just don't set the mnemonic
+			}
 		}
 		public void actionPerformed(ActionEvent e) {
@@ -93,5 +97,9 @@
 			super(UIManager.getString("OptionPane.cancelButtonText"), 
 					UIManager.getIcon("OptionPane.cancelIcon"));
-			putValue(MNEMONIC_KEY, new Integer((String)UIManager.get("OptionPane.cancelButtonMnemonic")));
+			try {
+				putValue(MNEMONIC_KEY, new Integer((String)UIManager.get("OptionPane.cancelButtonMnemonic")));
+			} catch (NumberFormatException e) {
+				// just don't set the mnemonic
+			}
 		}
 		public void actionPerformed(ActionEvent e) {
@@ -107,9 +115,9 @@
 	 * ComboBox with all look and feels.
 	 */
-    private JComboBox lafCombo = new JComboBox(UIManager.getInstalledLookAndFeels());
+	private JComboBox lafCombo = new JComboBox(UIManager.getInstalledLookAndFeels());
 	/**
 	 * Combobox with all projections available
 	 */
-    private JComboBox projectionCombo = new JComboBox(Projection.allProjections);
+	private JComboBox projectionCombo = new JComboBox(Projection.allProjections);
 	/**
 	 * The main tab panel.
@@ -120,16 +128,16 @@
 	 * Editfield for the Base url to the REST API from OSM. 
 	 */
-    private JTextField osmDataServer = new JTextField(20);
+	private JTextField osmDataServer = new JTextField(20);
 	/**
 	 * Editfield for the username to the OSM account.
 	 */
-    private JTextField osmDataUsername = new JTextField(20);
+	private JTextField osmDataUsername = new JTextField(20);
 	/**
 	 * Passwordfield for the userpassword of the REST API.
 	 */
-    private JPasswordField osmDataPassword = new JPasswordField(20);
-    /**
-     * Base url of the WMS server. Holds everything except the bbox= argument.
-     */
+	private JPasswordField osmDataPassword = new JPasswordField(20);
+	/**
+	 * Base url of the WMS server. Holds everything except the bbox= argument.
+	 */
 	private JTextField wmsServerBaseUrl = new JTextField(20);
 	/**
@@ -137,17 +145,17 @@
 	 * data line should be interpreted as one.
 	 */
-    private JTextField csvImportString = new JTextField(20);
+	private JTextField csvImportString = new JTextField(20);
 	/**
 	 * The checkbox stating whether nodes should be merged together.
 	 */
-    private JCheckBox drawRawGpsLines = new JCheckBox("Draw lines between raw gps points.");
+	private JCheckBox drawRawGpsLines = new JCheckBox("Draw lines between raw gps points.");
 	/**
 	 * The checkbox stating whether raw gps lines should be forced.
 	 */
-    private JCheckBox forceRawGpsLines = new JCheckBox("Force lines if no line segments imported.");
-
-    private JTable colors;
-	
-	
+	private JCheckBox forceRawGpsLines = new JCheckBox("Force lines if no line segments imported.");
+
+	private JTable colors;
+
+
 	/**
 	 * Create a preference setting dialog from an preferences-file. If the file does not
@@ -191,5 +199,5 @@
 			}
 		});
-		
+
 		// drawRawGpsLines
 		drawRawGpsLines.addActionListener(new ActionListener(){
@@ -204,6 +212,6 @@
 		osmDataUsername.setText(Main.pref.get("osm-server.username"));
 		osmDataPassword.setText(Main.pref.get("osm-server.password"));
-        wmsServerBaseUrl.setText(Main.pref.get("wmsServerBaseUrl", "http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&width=512&height=512&layers=global_mosaic&styles=&srs=EPSG:4326&format=image/jpeg&"));
-        csvImportString.setText(Main.pref.get("csvImportString"));
+		wmsServerBaseUrl.setText(Main.pref.get("wmsServerBaseUrl", "http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&width=512&height=512&layers=global_mosaic&styles=&srs=EPSG:4326&format=image/jpeg&"));
+		csvImportString.setText(Main.pref.get("csvImportString"));
 		drawRawGpsLines.setSelected(Main.pref.getBoolean("drawRawGpsLines"));
 		forceRawGpsLines.setToolTipText("Force drawing of lines if the imported data contain no line information.");
@@ -211,6 +219,6 @@
 		forceRawGpsLines.setEnabled(drawRawGpsLines.isSelected());
 
-		
-		
+
+
 		Map<String,String> allColors = new TreeMap<String, String>(Main.pref.getAllPrefix("color."));
 
@@ -244,5 +252,5 @@
 		});
 		colors.getColumnModel().getColumn(1).setWidth(100);
-		
+
 		JButton colorEdit = new JButton("Choose");
 		colorEdit.addActionListener(new ActionListener(){
@@ -264,5 +272,5 @@
 		osmDataUsername.setToolTipText("Login name (email) to the OSM account.");
 		osmDataPassword.setToolTipText("Login password to the OSM account. Leave blank to not store any password.");
-        wmsServerBaseUrl.setToolTipText("The base URL to the server retrieving WMS background pictures from.");
+		wmsServerBaseUrl.setToolTipText("The base URL to the server retrieving WMS background pictures from.");
 		csvImportString.setToolTipText("<html>Import string specification. lat/lon and time are imported.<br>" +
 				"<b>lat</b>: The latitude coordinate<br>" +
@@ -271,10 +279,10 @@
 				"<b>ignore</b>: Skip this field<br>" +
 				"An example: \"ignore ignore lat lon\" will use ' ' as delimiter, skip the first two values and read then lat/lon.<br>" +
-				"Other example: \"lat,lon\" will just read lat/lon values comma seperated.</html>");
+		"Other example: \"lat,lon\" will just read lat/lon values comma seperated.</html>");
 		drawRawGpsLines.setToolTipText("If your gps device draw to few lines, select this to draw lines along your way.");
 		colors.setToolTipText("Colors used by different objects in JOSM.");
-		
+
 		// creating the gui
-		
+
 		// Display tab
 		JPanel display = createPreferenceTab("display", "Display Settings", "Various settings that influence the visual representation of the whole program.");
@@ -301,5 +309,5 @@
 				"WARNING: The password is stored in plain text in the preferences file.<br>" +
 				"The password is transfered in plain text to the server, encoded in the url.<br>" +
-				"<b>Do not use a valuable Password.</b></html>");
+		"<b>Do not use a valuable Password.</b></html>");
 		warning.setFont(warning.getFont().deriveFont(Font.ITALIC));
 		con.add(warning, GBC.eop().fill(GBC.HORIZONTAL));
@@ -310,5 +318,5 @@
 		con.add(csvImportString, GBC.eop().fill(GBC.HORIZONTAL));
 		con.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.VERTICAL));
-		
+
 		// Map tab
 		JPanel map = createPreferenceTab("map", "Map Settings", "Settings for the map projection and data interpretation.");
@@ -320,5 +328,5 @@
 
 		tabPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
-	
+
 		// OK/Cancel panel at bottom
 		JPanel okPanel = new JPanel(new GridBagLayout());
@@ -350,5 +358,5 @@
 		JPanel p = new JPanel(new GridBagLayout());
 		p.add(new JLabel(title), GBC.eol().anchor(GBC.CENTER).insets(0,5,0,10));
-		
+
 		JLabel descLabel = new JLabel("<html>"+desc+"</html>");
 		descLabel.setFont(descLabel.getFont().deriveFont(Font.ITALIC));
