Chapter 9 Examples
-
- Note
- Depending on your operating system you may see
null pointer exception occur during the use of
JOptionPane. These are the result of a bug in the
event handling code in AWT and should be fixed in
the Java 2 version, but we have not been able to
test this on all platforms to confirm the fix.
-
- Message Dialogs
- InfoExample.java
displays an informational message. WarningExample.java
displays a warning message. ErrorExample.java
displays an error message. QuestionExample.java
displays a questioning message. PlainExample.java
displays a plain message. IconExample.java
displays a message with a custom icon. MultiExample.java
displays a multiple line message.
-
- Confirmation Dialog
- ConfirmExample.java
displays the default confirmation dialog.
-
- Option Types
- OTypeExample.java
displays the confirmation dialog with non-default
options.
-
- Input Dialog
- InputExample.java
displays the default input dialog.
-
- Input Dialog w/ Custom options
- SValExample.java
displays the an input dialog with custom
selection choices. Notice that the combo box will
clip because it is a lightweight window in a
dialog.
-
- Progress Dialog
- ProgExample.java
displays a custom option pane with a Progress
bar.
-
- Creating a Dialog
- ConstructExample.java
creates a dialog via construction rather than
with the convenience methods.
|