int blurRadius = 4;
int tx = 5;
int ty = 5;
PShadow shadowNode = new PShadow(contentNode.toImage(), SHADOW_PAINT, blurRadius );
contentNode.setOffset(tx, ty);
shadowNode.setOffset(tx - (2 * blurRadius) + 1.0d, ty - (2 * blurRadius) + 1.0d);
contentNodeWithShadow.addChild(shadowNode);
contentNodeWithShadow.addChild(contentNode);
contentNodeWithShadow.removeChild(shadowNode);
contentNodeWithShadow.setOffset(xoffset - tx - blurRadius, yoffset - ty - blurRadius);
contentNodeWithShadow.setBounds(0,0, contentNode.getWidth() + 2*blurRadius + tx, contentNode.getHeight() + 2*blurRadius + ty);