Search code examples
swingeditorjtabledoublecell

Java Swing jtable cell editor doubles E numbers


Hi I an issue with editors in a JTable.

I have a column which displays data as 26,687,489,800.00 ie: Double.

When the user clicks the cell to edit the data it is displayed as -2.66874908E10.

I want the data to be edited as it appears when it is displayed ie: 26,687,489,800.00 - without the E10 etc...

Any help would be appreciated.

Mike


Solution

  • You should employ a DecimalFormat instance to format your value correctly when you setup your editor.