private void tbl_userMouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: try { int row = tbl_user.getSelectedRow(); String Table_click = (tbl_user.getModel().getValueAt(row, 0).toString()); String sql = "select * from Userinfo where Pumid='"+Table_click+"' "; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); if(rs.next()) { String add1 = rs.getString("Pumid"); txt_pumpid.setText(add1); Date add2 = rs.getDate("Date"); txt_date.setDate(add2); String add3 = rs.getString("Ap_suat"); txt_ap_suat.setText(add3); String add4 = rs.getString("Nhiet_do"); txt_nhiet_do.setText(add4); String add5 = rs.getString("Volumeflow"); txt_volume.setText(add5); String add6 = rs.getString("RotationalSpeed"); txt_speed.setText(add6); } } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } finally { try { rs.close(); pst.close(); } catch (Exception e) { } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)