-
Bug
-
Resolution: Fixed
-
P2
-
8
I added two background fills to a region, both using color paint, only the second with an inset. the final result is wrong, the second fill looks like a gradient (see picture)
Here is the code:
public class HelloRegion extends Application {
public static void main(String[] args) {
// System.setProperty("prism.order", "sw");
// System.setProperty("prism.order", "j2d");
Application.launch(args);
}
@Override
public void start(Stage stage) throws Exception {
Region region = new Region();
region.setLayoutX(10);
region.setLayoutY(10);
region.setPrefWidth(100);
region.setPrefHeight(100);
BackgroundFill b1 = new BackgroundFill(Color.RED, null, null);
BackgroundFill b2 = new BackgroundFill(Color.BLUE, new CornerRadii(30), null);
BackgroundFill b3 = new BackgroundFill(Color.YELLOW, null, new Insets(40));
// region.setBackground(new Background(b1, b2, b3));
region.setBackground(new Background(b1, b3));
Group group = new Group();
group.getChildren().add(region);
Scene scene = new Scene(group, 300, 300/*, Color.VIOLET*/);
stage.setTitle(getClass().getCanonicalName());
stage.setScene(scene);
stage.show();
}
}
Here is the code:
public class HelloRegion extends Application {
public static void main(String[] args) {
// System.setProperty("prism.order", "sw");
// System.setProperty("prism.order", "j2d");
Application.launch(args);
}
@Override
public void start(Stage stage) throws Exception {
Region region = new Region();
region.setLayoutX(10);
region.setLayoutY(10);
region.setPrefWidth(100);
region.setPrefHeight(100);
BackgroundFill b1 = new BackgroundFill(Color.RED, null, null);
BackgroundFill b2 = new BackgroundFill(Color.BLUE, new CornerRadii(30), null);
BackgroundFill b3 = new BackgroundFill(Color.YELLOW, null, new Insets(40));
// region.setBackground(new Background(b1, b2, b3));
region.setBackground(new Background(b1, b3));
Group group = new Group();
group.getChildren().add(region);
Scene scene = new Scene(group, 300, 300/*, Color.VIOLET*/);
stage.setTitle(getClass().getCanonicalName());
stage.setScene(scene);
stage.show();
}
}
- duplicates
-
JDK-8120538 [SplitMenuButton] rendering changed in b63
-
- Closed
-
-
JDK-8125855 [TableView] rendering chagned in b63.
-
- Closed
-
- relates to
-
JDK-8091980 Percentage doesn't work in CSS Insets
-
- Open
-