完整代码链接:https://download.csdn.net/download/d_c_hao/10910140
方法一:
ShowUpableBillForm bill= (ShowUpableBillForm)super.getEditor();
int rows= bill.getBillCardPanel().getBodyPanel().getTable().getRowCount(); //获取表体行号
for(int i=0; i<rows; i++){
String sdateStr= bill.getBillCardPanel().getBodyValueAt(i, "startdate").toString();
UFDate startDate= new UFDate(sdateStr); //开始时间
String edateStr= bill.getBillCardPanel().getBodyValueAt(i, "enddate").toString();
UFDate endDate= new UFDate(edateStr); //结束时间
if( startDate.after(endDate) ){ //判断开始时间是否在结束时间之后
MessageBox.showMessageDialog("警告", "履历表记录第"+(i+1)+"行,开始时间大于结束时间!");