import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.shape.CircleBuilder; import javafx.scene.shape.Rectangle; import javafx.scene.shape.RectangleBuilder; import javafx.scene.shape.Shape; import javafx.stage.Stage; /** * * @author Alexander Kouznetsov */ public class Bug extends Application { public static void main(String[] args) { System.setProperty("http.proxyHost", "www-proxy.us.oracle.com"); System.setProperty("http.proxyPort", "80"); launch(args); } @Override public void start(Stage stage) throws Exception { final Rectangle rectangle = RectangleBuilder.create() .width(100) .height(100) .fill(Color.TRANSPARENT) .stroke(Color.RED) .build(); final Shape circle = CircleBuilder.create() .radius(100) .fill(Color.BLUE) .stroke(Color.BLACK) .build(); VBox vBox = new VBox(); vBox.getChildren().setAll(rectangle, circle, Shape.intersect(rectangle, circle), Shape.subtract(rectangle, circle), Shape.union(rectangle, circle)); Scene scene = new Scene(vBox, 600, 600); stage.setScene(scene); stage.show(); } }