For each [directed] graph we construct an inverse semigroup. Our main application is a simple proof of the characterization of partially ordered sets ofJ-classes of finite semigroups, and some generalizations; our proof avoids using the inductive construction of the previous method by one of the authors [4]. For a connected graph in which each vertex has index at least two, our construction gives a congruence free inverse semigroup. In the final section we describe how a slight modification bf the construction yields the polycyclic monoids.