0
public jfCategoria() {
    initComponents();
    Listar();
}

private void Listar(){
    DAOCategoria dao = new DAOCategoria();
    dtm = new DefaultTableModel();
    lista = dao.Listar();
    dtm.addColumn ("id");
    dtm.addColumn ("Categoria");
    dtm.addColumn ("Descripcion");
    for (Categoria c : lista) {
        dtm.addRow(new Object[](c.getIdcategoria(), c.getNombre(), c.getDescripcion()))
    }
    tblCategoria.setModel(dtm);
}

I don't know why im getting the error... Can someone help me? Sorry for the bad english.

Erwin Bolwidt
  • 28,093
  • 15
  • 46
  • 70

1 Answers1

0

You need to use braces ({}), not parentheses (()) to initialize an array:

dtm.addRow(new Object[] { c.getIdcategoria(), c.getNombre(), c.getDescripcion() } );
Erwin Bolwidt
  • 28,093
  • 15
  • 46
  • 70