Skip to main content


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 #780929] Thu, 19 January 2012 23:58
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);

}

}
Previous Topic:JOptionPane does not execute here--Why?
Next Topic:JOptionPane does not execute here--Why?
Goto Forum:
  


Current Time: Tue Apr 23 16:48:44 GMT 2024

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

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

Back to the top