public void focusGained(FocusEvent e) {
		JTextField textField = (JTextField)e.getComponent(); 
		String text = textField.getText();
		double value;
		
		try {
			NumberFormat format = NumberFormat.getInstance(Locale.getDefault());
			Number number = format.parse(text.toString().trim());
			value = number.doubleValue();
		} catch (NumberFormatException ex) {
			return;
		} catch (ParseException m) {
			return;
		}

		if (value == 0)
			textField.selectAll();
	}