public void keyPressed(KeyEvent ke) {

      if (ke.getKeyCode() == ke.VK_TAB) {
        int x = ((JTable) ke.getSource()).getSelectedColumn();
        int y = ((JTable) ke.getSource()).getSelectedRow();
        int maxX = ((JTable) ke.getSource()).getColumnCount();
        int maxY = ((JTable) ke.getSource()).getRowCount();
        TableModel tm = ((JTable) ke.getSource()).getModel();
        if (x == maxX - 1 && y == maxY - 1) {
          ((DefaultTableModel) tm).addRow(new Object[maxX]);
        }
      }
    }