Hi,
I want to create a transparent rectangle which may not cover the background image. Is any one here can help me to revise the code?
Thanks,
-Leo
private Rectangle createSelectWindow(final Color color, double length) {
//create a circle with desired name, color and radius
final Rectangle rect = new Rectangle(length, length);
//rect.setFill(Color.WHITESMOKE);
rect.setStroke(Color.WHITESMOKE);
//add a transparent effect
Blend blend = new Blend();
blend.setMode(BlendMode.SCREEN);
blend.setOpacity(1.0);
rect.setEffect(blend);
//change a cursor when it is over circle
rect.setCursor(Cursor.HAND);
return rect;
}
Edited by: leo on Nov 22, 2011 12:45 AM