Graph clustering has applications in many areas such as hypermedia systems, web communities and graph visualization. This paper proposes a new approach to clustering graphs. This approach constructs the node similarity matrix of a graph based on a novel metric of node similarity, and then applies the K-means algorithm to such a matrix to obtain a hierarchical abstraction of the graph. A heuristic method is proposed to overcome the inherent drawbacks of the k-means algorithm. We also describe a multilevel multi-window approach to hierarchical layouts of clustered graphs in different abstract level views for reduction of visual complexity. The proposed approaches demonstrate good results in our experiments, and an example of visualization of part of Java 1.4 class diagrams is shown as well.