import javabook.*;

/*
 * Introduction to OOP with Java 2nd Edition, McGraw-Hill
 *	
 *  A sample program to illustrate the use of
 *  MultiInputBox introduced in Section 9.4.
 *
 *  
 * @author Dr. Caffeine
 *
 */
class TestMultiInputBox
{
    
    public static void main (String[] args)
    {
        MainWindow       mainWindow;
        OutputBox 	     outputBox;
        MultiInputBox    multiBox;  
        
        mainWindow     = new MainWindow("Test MultiInputBox");
        outputBox      = new OutputBox( mainWindow );
        multiBox       = new MultiInputBox ( mainWindow, 3 );
                
        mainWindow.setVisible( true ); 
        outputBox.setVisible( true );
        
        
        String[]         labels = { "Name", "Address", "Age"};
        String[]         answer;

        multiBox.setLabels( labels );

        answer = multiBox.getInputs( );
        
        outputBox.printLine( " Values entered: " );
        outputBox.printLine( answer[0] );
        outputBox.printLine( answer[1] );
        outputBox.printLine( answer[2] );

   }
    
}