JOptionPane in Java

Download
Download is available until [expire_date]
  • Version
  • Download 185
  • File Size 1.28 KB
  • File Count 1
  • Create Date April 17, 2016
  • Last Updated April 17, 2016

JOptionPane in Java

JOptionPane in Java

A sample program in java that shows the different dialogs of JOptionPane; showMessageDialog which displays a message, showConfirmDialog which shows three options (yes, no and cancel), showInputDialog which allows you to input or enter a text.

Source code:

import javax.swing.JOptionPane;
public class swingdialog

{
	public static void main (String args[])
		{
JOptionPane.showMessageDialog(null,"Hello World");
		JOptionPane.showConfirmDialog(null,"Confirmation Dialog");
		JOptionPane.showInputDialog(null,"Input Dialog");
		
		}
	
	
}
, , , , , ,

Post navigation

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.