why are you writing such a fragile system that needs to know the number
of client windows? i do not think your system requires this. re think
the way you have developed things and sort out where your weakness is
that the number of client windows is important then redesign.
sorry, but java was not developed for this purpose. if the client
windows is important, then perhaps you should write in c++ so that you
can restrict the number of open client programs through use of the
windows api.