房间信息里面的是从数据库中调出来的.
把房间信息里面选中的行点击添加,加到开单房间的表中去!
****************************************************
public void jComboBox1_actionPerformed(ActionEvent e) {
String aa=jComboBox1.getSelectedItem().toString();
for(int j=0;j<30;j++){
for (int i = 0; i < table.getRowCount(); i++) {
table.removeRow(i);
}
}
try {
Statement s = numclass.numclass().createStatement();
ResultSet rs = s.executeQuery("select idroom,yumoney from room where room1='"+aa+"'");
while(rs.next()){
Object[] cells={rs.getString(1),rs.getString(2)};
table.addRow(cells);
}
} catch (SQLException ex1) {
}
}
public void jButton1_actionPerformed(ActionEvent e) {
int a=jTable1.getSelectedRow();
int b=jTable1.getSelectedColumn();
//table.getValueAt(a,table[b]);
//table1.insertRow(jTable1.getSelectedRow());
}
}
怎么提取房间信息表中的数据
[此贴子已经被作者于2007-8-6 22:58:11编辑过]