Given the 3 vertices of a triangle, computing the surface normal will tell you in which direction the triangle is facing (clockwise or counter clockwise) and the initial value of glFrontFace is GL_CCW. If you don't enable the back face culling (GL_CULL_FACE), both faces will be visible.
You can use the example of code I posted on Wikipedia if you want:
https://gist.github.com/gouessej/3420e2b6f632efdddf98Then, compute the triangles and replace the quads by your triangles. After that, replace the code using immediate mode (glBegin(), glEnd(), ...) by some code using the retained mode (VBOs). You can look at the project jogl-demos, especially the examples in the OpenGL Red Book ported to JOGL.
Edit.: Your triangles must be in the view frustum to be visible. Carefully set the projection matrix and the model-view matrix.