Is there a convenient way to use a spinner as an editor in a Swing JTable?

后端 未结 4 1823
梦如初夏
梦如初夏 2021-01-06 06:53

I deal with numeric data that is often edited up or down by 0.01*Value_of_variable, so a spinner looks like a good choice compared to a usual text cell.

I\'ve looke

4条回答
  •  一整个雨季
    2021-01-06 07:48

    Simply extend DefaultCellEditor and overwrite the getTableCellEditorComponent() method to return a JSpinner.

提交回复
热议问题