I use Dbutils to call elements in one table of database
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);
}
}
How to delete one element in table when I click the mouse to that element
Illustration: https://i.stack.imgur.com/ib77V.png