我如何在列项目日期的datepicker
内添加timepicker
和jtable
,从时间到时间?
我已在combobox
中添加了jtable
。
答案 0 :(得分:1)
TableColumn dateColumn = jTable1.getColumnModel().getColumn(4);
dateColumn.setCellEditor(new TimeTableEditor());
TableColumn dateColumn1 = jTable1.getColumnModel().getColumn(5);
dateColumn1.setCellEditor(new TimeTableEditor());
TableColumn dateColumn3 = jTable1.getColumnModel().getColumn(0);
dateColumn3.setCellEditor(new DateTableEditor());
使用 LGoodDatePicker-GitHub https://github.com/LGoodDatePicker/LGoodDatePicker并将上述代码放在JTable的PropertyChange中。(0,4,5)是列索引。< / p>