- Jun 6, 2020
- 11,559
- 4,422
Hi all,
this is a first attemp to make Java3D working on B4J using JavaObject.
This worked on pure Java and Jabaco that use directly java functions calls, with these I've managed it a lot and worked very well, but with B4J and JavaObject I cannot make it to work.
To start with... I've tried to port a simple demo project of a colored 3D cube that can be rotated with the mouse.
This on Jabaco works, but I cannot make it to work on B4J using JavaObject. Please what I do wrong here ?
Because Java3D works on top of Swing and AWT components I used a SwingNode to adapt it on JFX Form.
Because add directly the Canvas3D to the SwingNode seem not possible (it expets a JComponent), I used a JPanel with a BorderLayout set to the CENTER alignment, than put the Canvas3D inside it and then I add the JPanel to a SwingNode content, and finally to a JFX Form.
With the code I wrote, If I execute it in debug mode all objects seem to be fully initialized, I can see all Java3D properties changes...
this is a first attemp to make Java3D working on B4J using JavaObject.
This worked on pure Java and Jabaco that use directly java functions calls, with these I've managed it a lot and worked very well, but with B4J and JavaObject I cannot make it to work.
To start with... I've tried to port a simple demo project of a colored 3D cube that can be rotated with the mouse.
This on Jabaco works, but I cannot make it to work on B4J using JavaObject. Please what I do wrong here ?
Because Java3D works on top of Swing and AWT components I used a SwingNode to adapt it on JFX Form.
Because add directly the Canvas3D to the SwingNode seem not possible (it expets a JComponent), I used a JPanel with a BorderLayout set to the CENTER alignment, than put the Canvas3D inside it and then I add the JPanel to a SwingNode content, and finally to a JFX Form.
With the code I wrote, If I execute it in debug mode all objects seem to be fully initialized, I can see all Java3D properties changes...
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید