private void scheduleMatch()
    {

        clear();
        try
        {
            int matchCount = matchmgr.showCount();
            int teamCount = teammgr.showCount();
            if (teamCount > 0)
            {
                int tm = teammgr.getById(1).getGroupId();
                if (tm != 0)
                {
                    /*
                     * If no matches, schedules group plays.
                     */
                    if (matchCount < 1)
                    {
                        matchmgr.schedule(teammgr.listAll());
                        System.out.println("Group plays have been scheduled!");
                    }
                    else
                    {
                        System.out.println("Matches has already been scheduled!");
                    }
                }
                /*
                 * If groups is not assigned, returns an error.
                 */
                else
                {
                    System.out.println("You need to assign to groups before scheduling matches!");
                }
            }
            /*
             * If no teams, returns an error.
             */
            else
            {
                System.out.println("You need teams to schedule matches!");
            }
        }
        catch (SQLException ex)
        {
            System.out.println("ERROR : " + ex.getMessage());
        }
        pause();

    }