Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Home

4ntoine edited this page · 6 revisions
Clone this wiki locally

Welcome to the JavaFxDialog project!

Introduction

There are no standard dialogs (Information, Warning, Error) in JavaFx 2, so i decided to implement them myself.

Enjoy!

Screenshots

Information dialog Confirmation dialog

Warning dialog Error dialog

Throwable dialog

Features

Usage

Class name.antonsmirnov.javafx.dialog.Dialog:

public static void showInfo(String title, String message, Window owner)
public static void showWarning(String title, String message, Window owner)
public static void showError(String title, String message, Window owner)
public static void showThrowable(String title, String message, Throwable t, Window owner)

Note: there are according methods without 'owner' parameter.

Confirmation dialog usage (Builder pattern):

Dialog.buildConfirmation(title, message)
    .addYesButton(yesButtonHandler)
    .addNoButton(noButtonHandler)
    .addCancelButton(cancelButtonHandler)
        .build()
            .show();

Note: make sure you've added one button at least or you'll get exception:


java.lang.RuntimeException: Add one dialog button at least
    at name.antonsmirnov.javafx.dialog.Dialog$Builder.build(Dialog.java:363)

Author

Anton Smirnov (dev [at] antonsmirnov [dot] name)

License

Free for noncommercial usage

Something went wrong with that request. Please try again.