getText().trim()){JOptionPane.showMessageDialog(null,“用户名或密码错误请重新输入”);getfocus();//清空编辑框并获得焦点}数据查询实现DAOdao=newDAO();ResultSetrs=null;if(dao.CheckId(t_Id.getText().trim())){rs=dao.queryById(t_Id.getText().trim());intcolumns=0;try{ResultSetMetaDatadata=rs.getMetaData();Columns=data.getColumnCount();}catch(SQLExceptione){e.printStackTrace();}try{ while(rs.next()){ Vector<Object>v=newVector<Object>(); for(inti=1;i<=columns;i++){ v.addElement(rs.getString(i)); } model.addRow(v); }}catch(SQLExceptione){e.printStackTrace();}}else{JoptionPane.showMessageDialog(null,”车次记录不存在,请重新输入!”);Getfocus();}汽车信息添加功能实现DAOdao=newDAO();Validatevalidate=newValidate();Booleanval=validate.CheckPattern(t_start_time.getText().trim(),t_total_time.getText().trim(),t_factTicket.getText().trim(),t_price.getText().trim());