私は次のクラスを持っています:
public class customer_master extends javax.swing.JInternalFrame {
Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null;
JFrame parent;
public customer_master(JFrame parent) {
this.parent=parent;
initComponents();
try {
String qry="select customer_code, customer_name, customer_address, customer_created_time from customer";
database.JavaConnect jc= new JavaConnect();
con = jc.ConnectDB();
ps = con.prepareStatement(qry);
rs = ps.executeQuery();
jTable1.setModel(DbUtils.resultSetToTableModel(rs));
con.close();
}
catch(SQLException e)
{
JOptionPane.showMessageDialog(null, e);
}
}
}
列の名前も変更しますが、列名を変更せずにrsを追加したいのですが、助けていただければ幸いです。前もって感謝します。