import javax.swing.JOptionPane;
public class UserInput 
{

public UserInput( String Greeting )
   {
   String userIO = "";
	
   while(true)	
	   {
	   userIO = JOptionPane.showInputDialog( Greeting );
      System.out.println( userIO );
		
		if ( userIO.equals("q") )
		   {
			break;
			}		
	   } // end while				
   } //end constructor
	
	
public static void main(String args [])
   {
   UserInput one = new UserInput("one");
   UserInput two = new UserInput("two");
   UserInput three = new UserInput("three");
   }  // main
}  //end class
