public Boolean checkIfAllChildrenIsFinished(int Id) {
        boolean result = false;
        for (int i = 0; i < tasks.size(); i++) {
            if (tasks.get(i).getParentID() == Id && tasks.get(i).getTaskID() != Id) {
                System.out.println("statusID : " + tasks.get(i).getStatus().getStatusID());
                if (tasks.get(i).getStatus().getStatusID() == 4) {
                    result = true;
                    System.out.println("Er afsluttet!");
                    getAllChildrenById(tasks.get(i).getTaskID());
                } else {
                    result = false;
                    JOptionPane.showMessageDialog(frame, "Alle delopgaver skal være afsluttet", "Fejlrapport", JOptionPane.WARNING_MESSAGE);
                }
            }
        }
        return result;
    }