Java uses period in decimals, e.g. 1/2 = 0.5
Is there any way to make it use comma instead, as in 1/2 = 0,5? And not to use comma for thousands (as in one hundred thousand = 100,000) but use space instead (100 000)?
When it comes to output I suppose I could use all sorts of string format functions, but the problem is input (JTable). Some columns require Double format so users must enter something like 45.5 and in these parts they are used to 45,5 :) Thanks in advance
Update:
I tried using myTable.setDefaultLocale(Locale.Germany); but it didnt work. I also did Locale.setDefault(Locale.Germany); @ main function and it did work but in rather silly way: while cell is in editing mode, you must enter dot as normal, i.e. 45.5 but after you hit enter to confirm changes, it is displayed as comma: 45,5. I mean it uses comma only for display purposes, but when editing its still same ol' dot.
Is there any way to fix it without writing custom table model?