Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't like LWJGL in some cases, so I prefer to use Swing. The thing is that Swing doesn't have OpenGL. I have tried JOGL and it's a mess to install, needs external jars, and I have yet to get it working. So I was wondering if I could just make an OpenGL class that uses opengl32.DLL and put the graphics into a window made with Swing? Also, is opengl32.DLL able to be called with a 64 bit Java program?

share|improve this question

If you use a build system like MAVEN it is actually fairly easy to use JOGL. (But it is indeed stupidly hard to configure without it).

Just add this to your POM file

share|improve this answer

JOGL does just that, but makes it easier for you. If you have trouble installing JOGL, you will have a lot more trouble trying to do it yourself. If you still insinst on doing it yourself, search for JNI and/or JNA.

share|improve this answer
This is not really a helpful answer, it just says "try harder because it's the easiest think to do". Well... it's not the easiest thing to do. On the other hand, Roy actually gives some input. – Liosan Apr 22 '13 at 10:18
@Liosan If he has problems with JOGL, I would be happy to help. However in the question he said he doesn't want to use it and I tried to convince him that he should anyway, because I believe JOGL is the correct solution. If you think there is an easier solution for Swing-OpenGL interoperability, I would like to hear about it, as I agree JOGL is quite hard to setup for the first time. – msell Apr 22 '13 at 10:46
Fair enough, but still - Roy's answer actually adds something. Maybe the -1 was unnecessary, but I can't remove it now, it's "locked" :( As for alternatives, the OP stated that he doesn't like LWJGL, so there's not much more I can offer :) – Liosan Apr 22 '13 at 11:01
"This is not really a helpful answer" - but it's correct nonetheless. – Le Comte du Merde-fou Apr 22 '13 at 12:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.