Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » JOptionPane does not execute here--Why?
JOptionPane does not execute here--Why? [message #780928] Thu, 19 January 2012 23:57
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 Embarrassed . 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);

}

}
Previous Topic:Trouble downloading source code for previous versions of Eclipse via CVS
Next Topic:JOptionPane does not execute here--Why?
Goto Forum:
  


Current Time: Wed Dec 17 19:54:52 GMT 2014

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

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