price = new double[6]; // parallel arrays - ie same index used for both
product = new String[6]; // so if we get product 5 we also get price 5
setProducts(); // user-defined methods to fill arrays with data
setPrices();
T1 = new TextField(1);
T2 = new TextField(10);
T3 = new TextField(10);
L1 = new Label("Enter choice 1-6");
L2 = new Label("Product");
L3 = new Label ("Price");
errMess = new TextField(20);
T1.addActionListener(this);
T2.addActionListener(this);
T3.addActionListener(this);
P1 = new Panel();
P2 = new Panel(); // for output error message
P1.add(L1);
P1.add(T1);
P1.add(L2);
P1.add(T2);
P1.add(L3);
P1.add(T3);
add(P1);