Hi Lochana,

To rescale, just change line 69 in your MoleculeViewer class to :

renderer.paint(molecule_, new AWTDrawVisitor(g2), new
Rectangle2D.Double(0, 0, w, h), false);

where w/h are the width and height of the component. I tested this in
eclipse, and it seems to work.

gilleain

On 10/2/11, lochana menikarachchi <[email protected]> wrote:
> Hi All,
>
>
> I was trying to visualize a molecule on a JPanel using CDK rendering
> classes. The visualization works fine except it does not rescale when I
> change the size of Jframe at runtime. I need to make the diagram scale as
> the JFrame size is changed. See attached code.
>
> Thanks.
>
> Lochana
>

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to