// Using JOptionPane to display multiple lines in a dialog box.
import javax.swing.JOptionPane; // import class JOptionPane
public class Dialog1
{
public static void main( String[] args )
{
// display a dialog with a message
JOptionPane.showMessageDialog( null, "Welcome\nto\nJava" );
} // end main
} // end class Dialog1
No comments:
Post a Comment