How do i use JME in a GUI?

I would like to create a display with buttons, around my 3D area. My first thought was to create a Jframe on Borderlayout and add my GUI to the borders and the 3D view to the center… but i have no idea how (or even if it is possiable) to add the 3D space to my own JFrame or JPanel.



I have also seen alot of people here using FengGUI instead of Swing, is that a more viable option for 3D integration?



Is this possible, or is their another way to do this?

Swing isn't rendered by your openGL thread, so it wouldn't truly integrate well with your game unless you have your game rendering on a canvas placed on a swing window.



I prefer to use FengGUI which is actually rendered within the game.  Other options I have seen used are GBUI and JMEDesktop.  You should probably read through some of the threads on this forum to see what issues others have had with the different GUI libraries - to see what will suit you best.

Look at the RenParticleEditor or RenControlEditor, i think its pretty much exactly what you are looking for.

wow, the RenControlEditor is really awesome oO, I have never noticed it before

careful or you go blind from overexposure to pure awesomeness :wink:

RenControlEditor?

http://jsourcery.com/api/captiveimagination.com/jmonkeyengine/02-05-2007/jmetest/input/RenControlEditor.html



It seems to be an extension of JFrame, ya?

So i use this instead of my JFrame and i can add both buttons and a 3D area?

any hints as to how i'd go about adding the 3D content too it?



…or am i totally on the wrong track?

jmetest.util.JMESwingTest is a pretty basic example.

Hi, this might be slightly offtopic, but I was making a simple media browsing program (kind of like Front Row, but to load games too) in Java and thought implementing a bit of 3D into it might be nice. I managed to use SimpleCanvasImpl to attach and manage a canvas in my program. It now looks like this:



I was wondering if there was any way to disable the background, or set a transparency level to it. setBackground(ColorRGBA) only sets a color, but doesn’t do anything for alpha.


Not sure… Have not tried that.  You might need to set something else, like the opacity of the panel to false, etc.

That just makes the whole panel transparent, I was wondering if there was an option somewhere to tell the renderer to not draw the black background.



edit: Hey, no problem. I managed to get a BufferedImage of the area of the backdrop the canvas is covering, i put a quad behind the model and applied it as a texture, you can barely notice it doesn't belong. Thanks anyways.