There are many great websites devoted to crosswords online implementations of puzzles, and some good examples can be seen at the links below. The Washington Post has an excellent Java applet crossword, and the Philadelphia News has a good example of a CGI crossword. Excite's Puzzle page has some good links too.
The Xword Java Applet
The Xword Java applet is based on an example written by Carl Haynes and listed on the Sun Microsystems Java Applet resources page, and can also be viewed and downloaded together with the source code from the following link:
This is an excellent solution to the problem of programming crosswords, and I have followed the original implementation for the graphics realisation of the matrix, which is overlaid on top of the original Xword C++ classes which have been translated into Java.