found1[found].setText(s1);
found2[found].setText(s2);
found3[found].setText(s3);
found4[found].setText(s4);
found5[found].setText(s5);
found6[found].setText(s6);
found7[found].setText(s7);
found8[found].setText(s8);
Here found1[10], ....... , found8[10] are the name of JLabel and I want to name them as per the String name s1, s2, s3..... ,s8 whose names are assigned in the way as shown below:
String s1=String.valueOf(rs.getInt(1));
String s2=rs.getString(2);
String s3=String.valueOf(rs.getInt(3));
String s4=rs.getString(4);
String s5=rs.getString(5);
String s6=rs.getString(6);
String s7=rs.getString(7);
String s8=String.valueOf(rs.getInt(8));
Here rs is an object of ResultSet class and I am accessing data from table of database. All other codes are correct but I get runtime error every time when I reach at this code.