Action Performed :
try {Connection connect = Connect.getConnect();String sql = "select * from other Where coder like '" + jTextField1.getText() + "'";Statement stat = connect.createStatement();ResultSet res = stat.executeQuery(sql);while (res.next()) {table.addRow(new Object[]{res.getString(1), res.getString(2), res.getString(3), res.getString(4), res.getString(5), res.getString(6), res.getString(7)});//setVisible(true);res.close();stat.close();}jTable1.setModel(table);} catch (Exception e) {}
No comments:
Post a Comment