title: How to make a table cell blank when the column class is float or double
body: <p>I have a <code>JTable</code> which model was extended to <code>AbstractTableModel</code>. It has 4 columns. First two columns hold string and last two columns hold double type data. The last 2 columns displays 0.0 when the data is Null; </p>
  
  <p><strong>But I want to display it as blank when the value is null or 0; And when I will edit the cell and type any numerical value it will set double data type value with precision point.</strong></p>
  
  <pre><code>col1 || col2 || col3 || col4 
  -----------------------------
  aaa  || a1  || 250.00||
  bb   || b1  ||       || 10.5
  ============================
  </code></pre>
  
  <p>A solution may be that to change in <code>getValueAt(int rowIndex, int columnIndex)</code> method and return " " when columnIndex is 3 and 4. But it creates another problem. When I edit the cell it return String value and required to parse the string value to double at <code>setValueAt(Object value, int row, int col)</code> method with <code>Double.parseDouble(value.toString());</code> </p>
  
  <p>But I think it is not wise or correct to parse the string value to<code>Double</code>; I think <code>setCellEditor</code> may be a good solution. But I cant understand how to set a cell editor to double data type.</p>
  
  <pre><code>mytable.getColumnModel().getColumn(3).setCellEditor(???);
  </code></pre>
  
  <p>Could you give any solution.</p>