String listTitle = null; // 用来存放5个等级的题目序列 1,2,3,4,5 int title1[] = newint[1]; int n1 = 0; int title2[] = newint[1]; int n2 = 0; // int title3[] = new int[1]; // int n3 = 0; // int title4[] = new int[1]; // int n4 = 0; // int title5[] = new int[1]; // int n5 = 0; // int title6[] = new int[1]; // int n6 = 0; // int title7[] = new int[1]; // int n7 = 0; // int title8[] = new int[1]; // int n8 = 0; // int title9[] = new int[1];
String findSql = "select * from t_user where uid=" + id; User user = new User(); try { Connection con = DBcon.getDBcon().getConnection(); PreparedStatement ps = con.prepareStatement(findSql); ResultSet rs = ps.executeQuery(); while (rs.next()) {
String name = rs.getString(2); String password = rs.getString(3); int paperId = rs.getInt(4);
/** * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI * Builder, which is free for non-commercial use. If Jigloo is being used * commercially (ie, by a corporation, company or business for any purpose * whatever) then you should purchase a license for each developer using Jigloo. * Please visit www.cloudgarden.com for details. Use of Jigloo implies * acceptance of these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN * PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED LEGALLY FOR * ANY CORPORATE OR COMMERCIAL PURPOSE. */ publicclassUpdateStudentFrameextendsjavax.swing.JFrame{ privatestaticfinallong serialVersionUID = 1L;
/** * Auto-generated main method to display this JFrame */
String listTitle = null; // 用来存放5个等级的题目序列 1,2,3,4,5 int title1[] = newint[1]; int n1 = 0; int title2[] = newint[1]; int n2 = 0; // int title3[] = new int[1]; // int n3 = 0; // int title4[] = new int[1]; // int n4 = 0; // int title5[] = new int[1]; // int n5 = 0; // int title6[] = new int[1]; // int n6 = 0; // int title7[] = new int[1]; // int n7 = 0; // int title8[] = new int[1]; // int n8 = 0; // int title9[] = new int[1]; // int n9 = 0; // int title10[] = new int[1]; // int n10 = 0; Title title = null; for (int i = 0; i < listTitles.size(); i++) { title = listTitles.get(i); if (title.getLevel() == 1) { title1[n1] = title.getTid(); n1++; // 数组扩容 int length = title1.length; title1 = Arrays.copyOf(title1, length + 1); }
if (title.getLevel() == 2) { title2[n2++] = title.getTid(); int length = title2.length; title2 = Arrays.copyOf(title2, length + 1); }