Path finder java programme. Using swing to illustrate.