Jfoenix: Add an example for JFXAlert

Created on 26 Sep 2017  路  3Comments  路  Source: sshahine/JFoenix

Hi,

I couldn't find any examples how to use the alert box, could you add an example? (Or direct me to one if I missed it..)

Thanks!

Most helpful comment

Hello,
Here is a simple example

        // stage must have a scene
        JFXAlert<Void> alert = new JFXAlert<>(stage);
        alert.setContent(content);
        button.setOnAction(action-> alert.show());

Regards,

All 3 comments

Hello,
Here is a simple example

        // stage must have a scene
        JFXAlert<Void> alert = new JFXAlert<>(stage);
        alert.setContent(content);
        button.setOnAction(action-> alert.show());

Regards,

Thanks for the input!

Why the alert is generic, ie what can I do with the <Void>, like JFXAlert<Long>?

Hello,
JFXAlert extends Dialog where R is the return type of the dialog via resultProperty().

Regards,

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alittwin picture alittwin  路  4Comments

Natreve picture Natreve  路  4Comments

rickyzhangca picture rickyzhangca  路  4Comments

rfenters95 picture rfenters95  路  4Comments

TioCoding picture TioCoding  路  5Comments