// enter in dos window and outputs in JOptionPane


import javax.swing.JOptionPane;
import java.io.*;

public class WindowTest {
public static input in = new input();

   public static void main( String[] args ) throws IOException
   {

String s = "";
String na="";
while (! na.equals("done"))
  {System.out.println("Enter a name or done");
  na = in.getString();
  if (! na.equals("done"))
    s = s + na + "\n";
  }


    JOptionPane.showMessageDialog( null, s );  // display output all at once

      System.exit( 0 );
   } 
}