Wolfram Library Archive


All Collections Articles Books Conference Proceedings
Courseware Demos MathSource Technical Notes
Title Downloads

Creating a Basic Modal Dialog Box
Author

Wolfram Research, Inc.
Organization: Wolfram Research, Inc.
Address: 100 Trade Center Dr.
Champaign, IL 61820
Phone: (217) 398-0700
Fax: (217) 398-0747
Email: infocenter@wolfram.com
URL: http://www.wolfram.com
Description

This tutorial shows you how to create a basic dialog box that prompts the user to enter an angle, with a choice of whether it is being specified in degrees or radians. This example will demonstrate a dialog box that returns a value to a running Mathematica program when it is dismissed, much like Mathematica's built-in Input[] function, which requests a string from the user before returning. Dialog boxes like this one are not modal in the traditional sense that they must be closed before other Java windows can be used, but they are modal with respect to the kernel, which is kept busy until they are dismissed (that is, until DoModal[] returns). Section 1.2.5 of the J/Link User Manual discusses modal and modeless Java windows in detail.
Subjects

*Wolfram Technology > Front End > Palettes and Dialog Boxes
*Wolfram Technology > Linking Technology > J/Link
URL

http://library.wolfram.com/examples/ModalInputDialog/
Downloads Download Wolfram CDF Player

Download
ModalInputDialog.nb (48.8 KB) - Mathematica Notebook