跪求答案 try语句中部分语句不能实现
void showContent()
{
try
{
String orderid=rs.getString( "订单ID ");
jTextField1.setText(orderid);
//下来菜单当前列数据,setEditable为true;
jComboBox1.setEditable(true);
java.sql.Date orderdate=rs.getDate( "订货日期 ");
String orderdatestring=orderdate.toString();
jComboBox1.setSelectedItem(orderdatestring);
//交货日期
jComboBox3.setEditable(true);
java.sql.Date deliverdate=rs.getDate( "交货日期 ");
String deliverdatestring=deliverdate.toString();
jComboBox3.setSelectedItem(deliverdatestring);
//订单状态提取
int orderstatusid=rs.getInt( "订单状态ID ");
statement=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
resultset=statement.executeQuery( "select 状态 from 订单状态 where 订单状态ID= ' "+orderstatusid+ " ' ");
while(resultset.next())
{
String orderstatus=resultset.getString( "状态 ");
jComboBox4.setEditable(true);
jComboBox4.setSelectedItem(orderstatus);
}
//付款类型
int paytypeid=rs.getInt( "付款类型ID ");
sm2=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
rs2=statement.executeQuery( "select 类型名 from 付款类型 where 付款类型ID= ' "+paytypeid+ " ' ");
while(rs2.next())
{
String paytype=rs2.getString( "类型名 ");
jComboBox2.setEditable(true);
jComboBox2.setSelectedItem(paytype);
}