Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how can I set the Scene round-corner?

928280Apr 3 2012 — edited Apr 4 2012
Hi,All
Do you have any way to set the Scene round-corner?I need to customize a popup window, my solution is creating a Scene and place some controls on the scene,but it seems I can't set the scene round-corner.Any suggestions?
my code is below:
StackPane stackPane = new StackPane();
final Scene scene = new Scene(stackPane, 424, 154);
scene.setRoot(stackPane);
stackPane.setStyle("-fx-padding:10;");
Rectangle rectangle = new Rectangle(425, 28,Color.rgb(15,175,221));
rectangle.setStroke(Color.BLACK);
HBox hbox=new HBox();
hbox.setStyle("-fx-padding:15 0 0 -1;");
hbox.getChildren().add(rectangle);
stackPane.getChildren().addAll(hbox);
primaryStage.setScene(scene);
primaryStage.initStyle(StageStyle.UNDECORATED);
primaryStage.show();
Thanks

Edited by: noob on Apr 3, 2012 5:06 PM
This post has been answered by jsmith on Apr 3 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 2 2012
Added on Apr 3 2012
7 comments
1,875 views