I was wondering if it is possible to create a sine-grating like this in a JPanel using only Java2D.
I am not very adept with Swing and Java2D jet, so there might be simple things I am missing. If it is in fact not possible to do this could someone please provide me with an easy tutorial how to use OpenGL with JOGL inside a JPanel? I know Java2D and JOGL work together quite nicely but I really dont know how to initialize things to get a OpenGL graphic to show up in my normal GUI.