1-17. Developing a Dialog Box

Problem

You want to create an application that simulates a change password dialog box.

Solution

Use JavaFX’s stage (javafx.stage.Stage) and scene (javafx.scene.Scene) APIs to create a dialog box.

The following source code listing is an application that simulates a change password dialog box. The application contains menu options to pop up the dialog box. In addition to the menu options, the user will have the ability to set the dialog box’s modal state (modality).

/**  * Developing A Dialog  * @author cdea  */ public class DevelopingADialog extends Application {     static Stage LOGIN_DIALOG;     static int dx = 1;     static int dy = 1;     /**      * @param args the command line arguments      */     public ...

Get JavaFX 2.0: Introduction by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.