Starting out with BUI

I've just started to add a user interface into a project I'm working on and, with the sparse documentation for BUI, I'm having trouble creating the appropriate BUI object and connecting it into my JME scene? Is there any quick recipe for creating an empty interface and attaching it to a scene?

Also, if I use the CanvasRootNode how can I extract the name of the canvas I'm running my JME scene in to satisfy the constructor arguments? Or is the PolledRootNode the more commonly used option?

Any information on basic BUI development would be greatly appreciated. Thanks.

Just out of curiosity have you considered JMEDesktop instead?  It allows you to use Swing instead of a proprietary GUI inside your game.  It's still in beta stages but should be coming with the next release.  I would suggest looking into that as I don't think that BUI is being maintained anymore (I could be wrong about that, but it's been a long time since I've heard anything about it).


would be nice with a true opengl gui as well, jmedesktop is very slow and unresponsive…

MrCoder said:

would be nice with a true opengl gui as well

true - but it's a lot of work :)

jmedesktop is very slow and unresponsive

slow - ok, it's swing (though bui is even slower is even slower in most cases).
But unresponsive? Why do you think/write that?

I'd have to agree with Irrisor, it's as slow as I would expect from a GUI but I've been quite impressed with its speed and responsiveness in my games.  I'm currently using six JMEDesktops in one scene and it's working quite well and without any troubles after I got past the initial learning curve of getting it all functioning.


don't get me wrong…i love jmedesktop, it's just that swing is a pretty complex beast, and it's 2d-rendering is not the fastest around…but it will change with java 1.6 delivering opengl rendering for its 2d graphics  :slight_smile:

I wonder if it will be able to continue to be integrated in jME when that happens?


i think it will be optional…

Java already has hardware accelarated 2D drawing, that can also be used in Swing. This is done with the VoliteImage class. However, irrisor's implementation uses a BufferedImage, so any additions or improvements to hardware accelerated rendering for Swing won't benifit JMEDestop.

…Irrisor will figure out a way…won't you Irrisor?  :cry:


hehe, well, I haven't found a method to draw directly to graphics memory via Graphics in a way that I can create a texture from it. But probably this is/will be possible… don't know anything about actual implementation in 1.6 …

I just realized the power of pity…the world is my playground now!  :evil: