Created
November 30, 2012 20:41
-
-
Save 0x000000AC/4178447 to your computer and use it in GitHub Desktop.
Hello World using the JOptionPane
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************** | |
* HelloGUI.java | |
* Aaron P. Clark | |
* | |
* One of the last programs of the chapter. Exhibits | |
* the use of the JOPtionPane GUI | |
***********************************************/ | |
import javax.swing.JOptionPane; | |
public class HelloGUI | |
{ | |
public static void main(String[] args) | |
{ | |
JOptionPane.showMessageDialog(null, "Hello, World!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should consider adding
SwingUtilities.invokeAndWait()
to ensure the call makes it on the Event Dispatch Thread.https://gist.github.com/tresf/6e2f0fb8db69457ddc4e05a41b7c7c27