我使用 Dbutils 调用一个数据库表中的元素
private void showEvent(){
try {
String query="SELECT EventID, MemberID,Description, Date,
Time, Venue, EventTypes FROM formal UNION SELECT EventID,
MemberID,Description, Date, Time, Venue, EventTypes FROM social";
ps = c.prepareStatement(query);
rs=ps.executeQuery();
tbShowEvent.setModel(DbUtils.resultSetToTableModel(rs));
} catch (SQLException ex) {
Logger.getLogger(ShowEvent.class.getName()).log(Level.SEVERE, null, ex);
}
}
当我将鼠标单击到该元素时如何删除表格中的一个元素
插图:http: //i.stack.imgur.com/ib77V.png