Displaying Text in a Swing Dialog Box - Java Swing

Java examples for Swing:JOptionPane

Description

Displaying Text in a Swing Dialog Box

Demo Code

import javax.swing.JOptionPane; 

public class Main
{
   public static void main(String[] args)
   {//from   w  ww .  ja va2  s. com
      // display a dialog with a message 
      JOptionPane.showMessageDialog(null, "Welcome to Java");
   } 
}

Related Tutorials