Integration into Netbeans/swing

27 views
Skip to first unread message

Oliver...@orat.de

unread,
May 31, 2022, 10:56:15 AM5/31/22
to Jzy3d
Hi,
I want to integrate a jzy3d chart into a Netbeans/Swing application. If I understand it correct I can not use newt because I need overlapping components. In Version 2 there is not SwingChartComponentFactory anymore. What to use instead? Can somebody helps me with some lines of code how to get a JPanel of a chart?

best regards
Oliver

Martin Pernollet

unread,
May 31, 2022, 11:06:58 AM5/31/22
to jz...@googlegroups.com
Hi Oliver,

The factory just got renamed, sorry :) See a concise example here. The demo is probably too concise, but calling open() will build a JFrame, JPanel and add the GLJPanel into it.

To elaborate : this will provide a lightweight OpenGL canvas, meaning other components such as drop down, popups etc will be able to draw on top of it (maybe what you call "overlapping components"?).

Other possibilities
- use AWTChartFactory, which will use a GLPanel, hence a heavyweight AWT Panel that - should - not support other components drawn on top of it. Appart of this, it can fit into a Swing app.
- use EmulGLChartFactory, which provides an AWT Canvas using CPU for rendering instead of GPU. Slower but resilient to native incompatibilities. See the download page of 2.1.0 for a performance comparison. You can just change the factory and get charts changed inside your app. 

Best,

Martin



--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "Jzy3d".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jzy3d+un...@googlegroups.com.
Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msgid/jzy3d/997f4a3c-9019-4878-a375-2a568cc18a87n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages