Skip to content

Instantly share code, notes, and snippets.

@jake7864
jake7864 / JOptionPaneExample.java
Created July 10, 2012 09:27 — forked from anonymous/JOptionPane Example
na Example of how to use the JOptionPane to make GUIs.
import javax.swing.JOptionPane;
/*
///-_-_- JOPTIONPANE TUTORIAL -_-_-\\\
Hello this is my very first programming tutorial, what is up, this is a tutorial on how to use JOptionPane!
up to now you have been using System.out.print() to output messages & you've been using java.util.Scanner
to receive input but now I'll tell you how to use JOptionPane's showMessageDialog() & showInputDialog() methods.
JOptionPane programs are little pop up windows that either have a dialog box that has a message and asks for input that is
the showInputDialog() the other is showMessageDialog, it is just a little message with a Icon if you want, both pop up window
types can have a title & both need to have null for the container usually like probably too early for you for me to talk about that.
JOptionPane Programs are a lot more easy to use and to work with than the console type programs you have made so far,