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(","));
   }
 }
Ejemplo n.º 2
0
 private void all() {
   try {
     for (Rooms rooms : RoomsController.roomsController.all()) {
       model.insertRow(0, rooms.toArray());
     }
   } catch (Exception ex) {
     ex.printStackTrace();
   }
 }
Ejemplo n.º 3
0
 @Override
 public void roleadd(EventAll<Rooms> event) {
   model.insertRow(0, event.getSource().toArray());
 }