I have a desktop Swing application where I am currently using the 
JChemPaintEditorApplet as one of the input/output methods.  I am using CDK 
1.3.1, but don't currently have the source for JChemPaint. 

The method I have used for creating the editor panel is 

        final JChemPaintEditorApplet jcp=new JChemPaintEditorApplet();
        ....
        add(jcp,constraints);
        try{jcp.init();}catch (Exception ex){}

this seems to work well enough, but I think all will agree is a bit silly.

To avoid the exceptions I have tried using:
        final JChemPaintPanel jcp=new JChemPaintPanel(new ChemModel(), 
"JCP", true);
but this throws a NullPointerException when I try to run the program.

I guess I don't really understand the structure of the JChemPaintPanel.  I 
really like the layout of the Applet, but prefer to use it as part of a 
desktop application.  What is the standard method of including the 
JChemPaintEditorApplet panel in the application? 

This message and any files transmitted with it are the property of
Sigma-Aldrich Corporation, are confidential, and are intended
solely for the use of the person or entity to whom this e-mail is
addressed.  If you are not one of the named recipient(s) or
otherwise have reason to believe that you have received this
message in error, please contact the sender and delete this message
immediately from your computer.  Any other use, retention,
dissemination, forwarding, printing, or copying of this e-mail is
strictly prohibited.
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to