private void addRow() { if (table.getSelectedRow() != -1) { // inserts row below the selected one else bottom int numRow = table.getRowCount(); dtm.insertRow(numRow + 1, ",".split(",")); } else { dtm.addRow(",".split(",")); } }
private void all() { try { for (Rooms rooms : RoomsController.roomsController.all()) { model.insertRow(0, rooms.toArray()); } } catch (Exception ex) { ex.printStackTrace(); } }
@Override public void roleadd(EventAll<Rooms> event) { model.insertRow(0, event.getSource().toArray()); }