I try to insert my image from database to JTable but, it can't be shown. How can i overcome this problem?
public void loadData(ArrayList<Monster> monsters) {
/**
* Collection of Cell Example : Gondar 45 56 78 4 Axe 34 67 90 5
*/
Vector<Vector<String>> data = new Vector<Vector<String>>();
for (Monster item : monsters) {
Vector<String> dataRow = new Vector<String>();
dataRow.add("" + new ImageIcon(getClass().getResource("/images/monster/"+item.getAvatarUrl())));
dataRow.add("" + item.getName());
dataRow.add("" + item.getHp());
dataRow.add("" + item.getDp());
dataRow.add("" + item.getAp());
dataRow.add("" + item.getLevel());
data.add(dataRow);
}
this.setDataVector(data, columnElement);
}
