public void addGoup() throws ServerException,ClientException{
        if (logger.isDebugEnabled()){
            logger.debug("Called adding group");
        }
        if (groups.size()<tb.getRowCount()){
            String numGr = tb.getModel().getValueAt(tb.getRowCount()-1, 1).toString();
            String fakulty = tb.getModel().getValueAt(tb.getRowCount()-1, 0).toString();
            for (Group g : groups) {
                if (g.getNumber().equals(numGr))
                    throw new ClientException("A group with number " + g.getNumber()
                            + "is alredy exist");
            }
            try{
                client.addGroup(fakulty, numGr);
            }catch(ServerException e){
                logger.error("Error while adding new group",e);
                throw new ClientException (e);
            }
            Group newGroup = new Group(fakulty, numGr);
            groups.add(newGroup);
        }
    }