antialiasing polygon edges

i tried to execute a program from programming with Opengl antialing polygon edges , but unfortunately the program was not showing any output. it is also the case with antialiasing with colorindex mode.
i tried to set the glOrtho ie is the viewing volume but with any kind of adjustments there was no output.

is it a problem with the code or with the viewing volume iam not able to understand.
help me understand this.