[英]select JDatechooser from String Sql
when i select return book date from JDateChooser
and click enter button..the return date is not display in the JTable
. 当我从
JDateChooser
选择退货日期并单击Enter按钮时。退货日期未显示在JTable
。
private void jButton19ActionPerformed(java.awt.event.ActionEvent evt) {
try
{
((JTextField)jDateChooser7.getDateEditor().getUiComponent()).getText();
String sql="select * from borrowed_book_record where return_date='"+jDateChooser7.getDateFormatString()+"'";
pst=conn.prepareStatement(sql);
rs=pst.executeQuery();
jTable4.setModel(DbUtils.resultSetToTableModel(rs));
jTable4.setVisible(true);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,""+e,"Error",JOptionPane.ERROR_MESSAGE);
}
}
without any example, i could only guess on the dateformat. 没有任何示例,我只能猜测dateformat。 Check the dateformat of the datecomponent against the dateformat return by the sql query!
根据sql查询返回的dateformat检查datecomponent的dateformat!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.