Question about using some JME views inside a Netbeans module

karmaGfa said:

Finally, I found an editor on this website, but I feel that it lacks an open tool platform like Netbeans.


Oops, I just realized that the tool is working on Eclipse. My apologies for my previous comment  :roll:

However, I am very happy to realize it, because I know that I might now reuse some pieces of code from it to see how to embed the 3DView inside Netbeans.

Cool  :D
karmaGfa said:

However, I am very happy to realize it, because I know that I might now reuse some pieces of code from it to see how to embed the 3DView inside Netbeans.

I doubt it - NetBeans is swing, and Eclipse is swt. But there are other examples of drawing jME in swing, even lightweight - you should find discussions about that on the forum.

NetBeans integration should be somewhat easier than the Eclipse integration, because its using Swing, which is well supported by jME. SWT is not supported at all and there are many different "hacks" out there to get it to work.

Multiple views are still a big problem. In MW3D its possible to have more than one editor, but they share some resources. I havent figured out yet, where the problem is, maybe its a jME problem, maybe its a LWGL problem, i dont know yet.



Isn't there some effort to share plugins between NetBeans and Eclipse?

I got some results:



http://img170.imageshack.us/my.php?image=jmeinnetbeans01ln4.png



But I also have the following problems:

Guys,



I am still totally stuck at the exact same position where I was in my previous post and I am about to give up.



Maybe I didn't understand correctly what I saw, but after the inspection of the source code of JME I realized that there is clearly no support (or a bad one) for rendering to multiple components. The source of the method

LWJGLDisplaySystem.initForCanvas(int width, int height) {…}

totally destroyed my hopes:


  • The display system of LWJGL (which is the only one currently supported) doesn't support multiple renderers. I can only initialize 1 at a time, with a specific width and height. I am totally confused about how I should do to render 2 different scenes in NetBeans into 2 panels that have different dimensions.

  • I still don't understand why my component turns black as soon as I close the tab and reopen it.



Anybody can help, please ?

Karma I think you may be out of luck until one of the following happens:


  1. JOGL is supported by JME as they have a swing based canvas.
  2. Java 7 is released.  I believe something is being done to either completely fix the problems associated with mixing heavyweight/lightweight components, or greatly reduce them.



    You can get around some of the problems you'll have embedding JME in a netbeans platform module by following the instructions in this thread:

     

    http://www.jmonkeyengine.com/jmeforum/index.php?topic=2666.0  (see reply #7)



    Hope this helps.




after the inspection of the source code of JME I realized that there is clearly no support (or a bad one) for rendering to multiple components.

My JmeContext system supports multiple renderers/canvases.

But I also have the following problems:
- The JMEPanel doesn't render anything after I close my window or change the layout:

This issue need further testing as it is possible that the problem is in netbeans' handling of the tab.


Did you check renanse's lightweight JMEComponent class yet? He posted it recently in some other thread.
Momoko_Fan said:
My JmeContext system supports multiple renderers/canvases.


Can I take a look at your source code, please? In the forum, I only saw 1 class, I want to see them all  :)

This issue need further testing as it is possible that the problem is in netbeans' handling of the tab.


This problem might disappear once I get the rendering in a swing component.

Did you check renanse's lightweight JMEComponent class yet? He posted it recently in some other thread.


Yes, I did, but it just shown a JPanel with an image inside, with an access to its pixels, and with a thread running a repaint() method. Nothing more.

Well, actually it keeps things lightweight by grabbing the GL contents and painting them to the component.  It's a simple and straightforward method.

@karmaGfa:

any progress? I'm really interested in this since I'm currently moving my app from Eclipse/RCP to Netbeans/RCP. I had no problem (well, you know…) with SWT bindings, but as you know, Swing is more of a problem.

So if you've tested JMEComponent, or other stuff…



Thanks :slight_smile:

Hi,



I have an issue with a JME canvas in a JPanel inside a NetBeans window.



It works fine on most computers, but on some people’s computers the canvas doesn’t show. There is only a grey background in place of the canvas.



On one guy’s computer who has the IDE the application works fine when started from the distribution, but has the same problem when started from the IDE. He gets an exception from the class Verifier. I’m not sure what it means and how to fix it.



Both of them who have the same problem have a NVIDIA GeForce. One of them has a brand new laptop.



Sorry I cannot provide more info. There is no error printed on the console when the application is started from the cmd line.



I’m using a JME3 build from April this year. Compiling on NetBeans 7.1.2.



Thanks!

@martinnavratil said:
Hi,

I have an issue with a JME canvas in a JPanel inside a NetBeans window.

It works fine on most computers, but on some people's computers the canvas doesn't show. There is only a grey background in place of the canvas.

On one guy's computer who has the IDE the application works fine when started from the distribution, but has the same problem when started from the IDE. He gets an exception from the class Verifier. I'm not sure what it means and how to fix it.

Both of them who have the same problem have a NVIDIA GeForce. One of them has a brand new laptop.

Sorry I cannot provide more info. There is no error printed on the console when the application is started from the cmd line.

I'm using a JME3 build from April this year. Compiling on NetBeans 7.1.2.

Thanks!

This thread is 4 years old... Anyway try using the awt panels, its what the SDK does as well.