public static void main(String[] args) 
    {
        Graph g = new GraphAdjList();
        
        Frame app;
        
        BufferedReader in = null;
        
        try {
            in = new BufferedReader( new FileReader("Graph.txt") );
        } catch( FileNotFoundException e) {
            System.out.println("Graph.txt not found");
        }
        
        try { 
            int num = Integer.parseInt( in.readLine() );
            
            for( int i=0; i<num; i++)
                g.einfKnoten( new Knoten<Integer>(i+1) );
            
            while(true)
            {
                String str;
                str = in.readLine();
                             
                if( str==null || str.length()==0)
                    break;
                
                String[] pair = str.split("-");
                int v1 = Integer.parseInt(pair[0]);
                int v2 = Integer.parseInt(pair[1]);
                g.einfKante(v1-1, v2-1);
            }

        }
        catch (IOException ioe) {}
       
        app = new GraphTest( g, "example Graph" );
        new GraphTest( g.dfs(), "DFS Graph");
        new GraphTest( g.bfs(), "BFS Graph");
    }