HashMap<String, BookMarkBase> ListBookMark = new HashMap<>();
public void readFromBookMarkBase() {
System.out.println("the program is outputing this");
for (BookMarkBase bs : ListBookMark.values()) {
System.out.println("not getting inside");
if (((DefaultTableModel) jTable1.getModel()).containsspecificrowelseaddit(bs.GetName()) == null) {
((DefaultTableModel) jTable1.getModel()).addRow(new Object[]{false, bs.GetName(), "", "", 0, ""});
}
}
}
我要检查Java是否包含带有特定字符串的特定行,如果找不到则添加行。