Java Swing – JOptionPane showOptionDialog example

The showOptionDialog method of JOptionPane is the Grand Unification of showConfirmDialog, showInputDialog and showMessageDialog. The showOptionDialog returns an integer which represents the position of the user’s choice in the Object[]. Note If you want to read more about the different showXxxDialog methods, refer to Java Swing – JOptionPane showConfirmDialog example Java Swing – JOptionPane showInputDialog …

Read more

Java Swing – JOptionPane showConfirmDialog example

This is a review of the showConfirmDialog() method of JOptionPane Class. This method is a quick and easy way to get user input by asking a confirming question, like yes/no/cancel . The showConfirmDialog() can be called using the following combinations of parameters: Component, Object Component, Object, String, int Component, Object, String, int, int Component, Object, …

Read more

Java Swing – JOptionPane showMessageDialog example

This is a review of the showMessageDialog() method of JOptionPane Class. This method is a quick and easy way to tell the user about something that has happened . The showMessageDialog() can be called using the following combinations of parameters: Component, Object Component, Object, String, int Component, Object, String, int, Icon Component – The first …

Read more

Java Swing – JOptionPane showInputDialog example

This is a review of the showInputDialog() method of JOptionPane Class. With this method we can prompt the user for input while customizing our dialog window. The showConfirmDialog returns either String or Object and can be called using the following combinations of parameters: Object (returns String) – Shows a question-message dialog requesting input from the …

Read more

Android custom dialog example

In this tutorial, we show you how to create a custom dialog in Android. See following steps : Create a custom dialog layout (XML file). Attach the layout to Dialog. Display the Dialog. Done. P.S This project is developed in Eclipse 3.7, and tested with Android 2.3.3. Note You may also interest to read this …

Read more

Android prompt user input dialog example

In this tutorial, we will enchance the previous AlertDialog example, to make it able to accept user input, just like a PromptDialog. More specific, this is a custom AlertDialog example. See following steps : Create a prompt dialog layout (XML file). Attach the prompt dialog layout to AlertDialog.Builder. Attach the AlertDialog.Builder to AlertDialog. Done. P.S …

Read more

Android alert dialog example

In this tutorial, we show you how to display an alert box in Android. See flowing Steps : First, use the AlertDialog.Builder to create the alert box interface, like title, message to display, buttons, and button onclick function Later attach above builder to AlertDialog and display it. Done. P.S This project is developed in Eclipse …

Read more