Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » JOptionPane does not execute here--Why?(JOptionPane)
JOptionPane does not execute here--Why? [message #780932] Fri, 20 January 2012 00:20
l m is currently offline l mFriend
Messages: 4
Registered: January 2012
Junior Member
Hi--I am running this program in Eclipse/helios and after I enter the word in the console the msg dialog box does not open. I run the Strings class via cmd and the dialog box opens properly.


import javax.swing.JOptionPane;
import java.util.Scanner;

public class Strings {

public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter a word...");
String s1 = input.next();
System.out.println("s1 is " + s1);

String message = "Java is fun";
JOptionPane.showMessageDialog(null, message);

}

}

[Updated on: Fri, 20 January 2012 00:21]

Report message to a moderator

Previous Topic:JOptionPane does not execute here--Why?
Next Topic:Using Google Maps API
Goto Forum:
  


Current Time: Fri Mar 29 07:06:07 GMT 2024

Powered by FUDForum. Page generated in 0.05495 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top