I want to add a cell editor in a JTable that accepts numbers only (BigDecimal type to be precise). I have experimented all the proposed code and have read also all the similar questions here. However none of the proposed solutions worked for me. The documentation available in the internet including Oracle's website is not so good on the topic I'm looking for.

Please, notice: The cell editor must accept numbers only, actually numbers and decimal separators (. or ,).