大家好我刚刚创建jSpinner以获得这种格式的时间(HH:mm:ss)并将其存储到数据库中,我自定义代码,当我运行代码时,时间正确显示但我可以'得到时间并将其存储到数据库中。
这是我的自定义代码:
Date date1 =new Date();
SpinnerDateModel sm =
new SpinnerDateModel(date1 ,null, null,Calendar.HOUR_OF_DAY);
start_time = new javax.swing.JSpinner(sm);
JSpinner.DateEditor de = new JSpinner.DateEditor(start_time,"HH:mm:ss");
start_time.setEditor(de);
// Code adding the component to the parent container - not shown here