
How to create reports in java. The report should come from the access It should be displayed in the JTable and should be updated automatically when the user is saved a record in the JTable

DBConnection venkat=new DBConnection(); Connection con=venkat.getConnection(); //System.out.println("venkat"+con); PreparedStatement pstmt=null; Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("select to_char(date1,'dd-mon-yyyy'),branch,membership_id,available_bal,deposit_amt,withdrawl_amt,ledger_balance from transaction where membership_id='"+mid1+"'");
int i=0;
int j=0;
while(rs.next()){
jTable1.setValueAt(rs.getString(1),i,j);
jTable1.setValueAt(rs.getString(2),i,++j);
jTable1.setValueAt(rs.getString(3),i,++j);
jTable1.setValueAt(rs.getString(4),i,++j);
jTable1.setValueAt(rs.getString(5),i,++j);
jTable1.setValueAt(rs.getString(6),i,++j);
jTable1.setValueAt(rs.getString(7),i,++j);
i=++i;
j=0;
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.