Use light viewer in Java API

User dfeb81947d

21-10-2009 15:12:43

Dear Support,


 


Using JChem API, I would like to add in a JPanel a light molecule viewer. If I use MViewPane, it's too heavy, and it contains many functionnalities that I don't need and I think that AlchemistMoleculeView should be the same. MoleculeComponent would be nice, but actually it doesn't implements or extends any graphical container.


A way would be to export the Molecule into an Image and show it using an ImageIcon.


 


But I wonder if there is a light Panel to show Molecules?


Thank you for your answer


 


Best Regards,


Jacques

ChemAxon 909aee4527

21-10-2009 15:22:23

Dear Jacques,


you could use MolPrinter, though it is not a JComponent, it can easily be used with one.


As an example I suggest the MoleculeRenderer component described here:
http://www.chemaxon.com/marvin/examples/beans/jfilechooser-accessory/index.html


The MolPrinter API: http://www.chemaxon.com/marvin/help/developer/beans/api/chemaxon/marvin/MolPrinter.html


Would this be suitable for your needs?


Kind regards,
Judit

User dfeb81947d

22-10-2009 10:29:24

Thank you very much for your help and for the example. I think it should solve my problem. If not I'll come back to you. Thank you again.


Best Regards,


Jacques