opengl and java

i thought opengl was just a library. Would i be able to use opengl in java. Meaning using widgets like buttons in java to make objects(drawing a sphere or something) in opengl?

OpenGL is a library and you can use it from java. But you must be confused about what kind of library it is. Read the The OpenGL Programming Guide - The Redbook before asking any more questions.

[quote]i thought opengl was just a library. Would i be able to use opengl in java. Meaning using widgets like buttons in java to make objects(drawing a sphere or something) in opengl?
[/quote]
OpenGL is a 3D rendering library. There are two bindings to OGL available right now or Java, LWJGL and JOGL. Im not sure on the current state of LWJGL, it used to take over the screen and be totally exclkusive of AWT, which is what renders Java GUI stuff.

JOGL is compatable with AWT, although ive heard rumors of a bug or two in that. Anyway you can make a JOGL window in an otherwise SWING or AWT interface using JOGL. Hwoever what you can’t do I don’t believe is overlayAWT and JOGL ontop of each other.

Now most game programmers dont do ANY of this, they build their own widgets ontop of OGL so that they cna have ful lcontrol of the screen adn render. In the long run yo umay find mixing SWINg and JOGL in a single app to be problematic just because ga,mes don’t tend to match an AWT event-driven type model.

Hope that helps.