Is JMokey Right for me?

Hi guys,

I am working on a desktop application. It’s not exactly a game, but I think using tools to make games will help me do what I want. Here is an example of the kind of look I am going for, for my application:

So I need a 3D view inside an interface with the typical swing components and such. I should be able to pan/zoom the 3D view, and do some basic interacting with it. Essentially, I just need the 3D view to have a grid with squares. When I click a square, it selects it by showing the square kind of extrude out of the grid. That’s the basic thing I’m going for.

So is JMonkey right for me? Or is something else more appropriate? Thanks for your help. Please let me know if you need more detail, and I would appreciate any advice you may have,

Note: I am an intermediate programmer.

The issue is mainly with integrating swing and the opengl thread when you use jmonkey which might be hard to get right for an intermediate programmer. Apart from that no general reason why it would not work, the SDK basically looks the same :slight_smile:
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or theres an increased use of exclamation marks and all-capital words.

@normen said: The issue is mainly with integrating swing and the opengl thread when you use jmonkey which might be hard to get right for an intermediate programmer. Apart from that no general reason why it would not work, the SDK basically looks the same :) The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or theres an increased use of exclamation marks and all-capital words.

Thanks! So is there a better (read: easier) way to do this? Do I need to use something as powerful as JMonkey to accomplish something as simple as what I need?

Not really because the task you set isn’t exactly simple ^^ You could circumvent the threading issue by using a gui system that is based on the update loop but that would in turn strip you of all your swing skills (as in you have to learn a new UI system) and won’t allow you to use the shiny UI editors you’re probably used to :wink: So you’ll probably have to swallow one toad or the other… Given that for “business” or “science” applications the data work is much heavier it probably makes sense to stick with swing just like the SDK does it because of the java editor / IDE infrastructure.

The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or theres an increased use of exclamation marks and all-capital words.

@normen said: Not really because the task you set isn't exactly simple ^^ You could circumvent the threading issue by using a gui system that is based on the update loop but that would in turn strip you of all your swing skills (as in you have to learn a new UI system) and won't allow you to use the shiny UI editors you're probably used to ;) So you'll probably have to swallow one toad or the other.. Given that for "business" or "science" applications the data work is much heavier it probably makes sense to stick with swing just like the SDK does it because of the java editor / IDE infrastructure.

The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or theres an increased use of exclamation marks and all-capital words.

Thanks! Forgive me, but I am a bit confused. So are you recommending against JMonkey for my project? And I meant simple in the sense that I don’t need to do any crazy renderings through JMonkey. I don’t know if that’s simple or not though.

How do you think the creator of the software which I showed a picture of in my OP created his application? I am sure there are tonnes of ways though, so my question may be bad.

Thanks again.

@funkeemonkee said: Thanks! Forgive me, but I am a bit confused. So are you recommending against JMonkey for my project? And I meant simple in the sense that I don't need to do any crazy renderings through JMonkey. I don't know if that's simple or not though.

How do you think the creator of the software which I showed a picture of in my OP created his application? I am sure there are tonnes of ways though, so my question may be bad.

Thanks again.


As I said in the first post, jMonkeyEngine works fine for such a project, its own SDK looks exactly like your screenshot basically. I was talking about the general implications for such a project for an intermediate programmer (or any programmer for that matter). There is no easier way than with jMonkeyEngine, still its not easy is what I intended to say.
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or theres an increased use of exclamation marks and all-capital words.

@normen said: As I said in the first post, jMonkeyEngine works fine for such a project, its own SDK looks exactly like your screenshot basically. I was talking about the general implications for such a project for an intermediate programmer (or any programmer for that matter). There is no easier way than with jMonkeyEngine, still its not easy is what I intended to say. The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or theres an increased use of exclamation marks and all-capital words.

Ok, maybe I will just try it out and see if it works. It should be alright. I found a tutorial which I think is kind of relevant here: https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:swing_canvas

I was also looking into Java3D, as it seems to be very easy to integrate into a swing environment. But I have read some bad things about Java3D, which is making me second guess.

I’m using JME together with Swing for my simulation application in a similar way that your picture states and my application runs smooth. I wouldn’t recommend it for java beginners but on the other hand you get all the power of JME.

Java3D is essentially obsolete.

@funkeemonkee said: Ok, maybe I will just try it out and see if it works. It should be alright. I found a tutorial which I think is kind of relevant here: https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:swing_canvas

I was also looking into Java3D, as it seems to be very easy to integrate into a swing environment. But I have read some bad things about Java3D, which is making me second guess.

I have used Java3D for a few years. I can confirm that it is easy to integrate into swing, but I would avoid it. It is slow, doesn’t support much in terms of rendering, and there is no active community. It has high levels of abstraction, which means it is easy to work with simple scenes, but once you need something specific, you will find yourself digging through a huge class tree to find the piece of functionality you want to modify. And you learn little about graphics rendering, because of the abstraction. I still use Java3D once or twice per year to teach a 3D graphics related subject to school children, I use it because they do not have to worry about thread safety and simple stuff is easy to do ( Well… The main reason is probably that the course material was originally made in Java3D - and I’m too lazy to rewrite it all ), but I would never subject myself to it again.

@Lockhead said: I'm using JME together with Swing for my simulation application in a similar way that your picture states and my application runs smooth. I wouldn't recommend it for java beginners but on the other hand you get all the power of JME.

Well I am not exactly a beginner, but certainly not an expert. Do you have any resources/tutorials which explain how to do this? Thanks.

@nihal said: I have used Java3D for a few years. I can confirm that it is easy to integrate into swing, but I would avoid it. It is slow, doesn't support much in terms of rendering, and there is no active community. It has high levels of abstraction, which means it is easy to work with simple scenes, but once you need something specific, you will find yourself digging through a huge class tree to find the piece of functionality you want to modify. And you learn little about graphics rendering, because of the abstraction. I still use Java3D once or twice per year to teach a 3D graphics related subject to school children, I use it because they do not have to worry about thread safety and simple stuff is easy to do ( Well... The main reason is probably that the course material was originally made in Java3D - and I'm too lazy to rewrite it all ), but I would never subject myself to it again.

Good to know. I think I will skip Java3D then and just try to make things work with JME.

@funkeemonkee said: Well I am not exactly a beginner, but certainly not an expert. Do you have any resources/tutorials which explain how to do this? Thanks.
I found all the information required in the tutorial section, code examples(Test Cases) and in several threads. Don't forget to use callables and runnables. Broke my neck often :p.

Yeah, there is a specific tutorial on using JME with swing (covering the two options for doing that) and also there is the threading tutorial.

Those cover all your swing integration…from that you should go through the other tutorials just so you know what’s going on :smiley: