JavaFX Notification with ControlsFX

3.4k Views Asked by At

I am doing Stocks market app, I need to display Order status changes to user. I came across ControlsFX Notification. From doc example, it looks like we can only specify simple text for it's content.

Notifications.create()
             .title("Title")
             .text("Hello Notification")
             .darkStyle()
             .show();

Is there a way to specify content Node, eg: TableView? As I would like to group a bunch of messages together, present in TableView / ListView, then show in single notification.

If not achievable with ControlsFX, any other recommendation? Thanks!

1

There are 1 best solutions below

3
On BEST ANSWER

You can set a Node to display unsing graphic.

Notifications.create()
        .darkStyle()
        .title("Title")
        .graphic(new Rectangle(600, 400, Color.RED)) // sets node to display
        .hideAfter(Duration.seconds(10))
        .show();