Posts by Igor Lobo • 41 points
2 posts
-
0
votes2
answers34
viewsA: jTable does not add the second string I put in an array
The error is in foreach String[] linha = {"primeira linha", "segunda linha"}; for(String linhas : linha){ ((DefaultTableModel) jTable.getModel()).addRow(linha); System.out.println(linha); } In the…
-
1
votes1
answer142
viewsA: Problem returning values to a combobox from a query
The problem is inside your foreach for(Departamento d: dao.read()){ **obsDepartamentos = FXCollections.observableArrayList(d);** cbDepart.setItems(obsDepartamentos); } At every iteration of foreach…