求助各位大神,我使用List存储数据库的所有数据,但是最后遍历出来的,只有最后的那一条数据,求助求助!
public class InformationList {//------------------首先是我建立的一个pojo
//首先定义了6个变量,int类型的id,double类型的money,和String类型的date(时间)、name(名字)、type(记录类型)、other(备注)
private int id;
private double money;
private String date,name,type,other;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public double getMoney() {
return money;
}
public void setMoney(double money) {
this.money = money;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getOther() {
return other;
}
public void setOther(String other) {
this.other = other;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
然后就是我在JFrame画的一个界面图