Comma can be used as a decimal point depending upon Locale. The NumberFormat class can handle this based on the current Locale().

Java Code:
NumberFormat nf = NumberFormat.getInstance();
Number n = nf.parse(((TextField)theComponent).getText());
BigDecimal aDecimal = new BigDecimal(n.doubleValue());