//Sana Yousuf Yay for java! import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.text.DecimalFormat; // include files import java.io.*; import java.io.File; public class test extends JFrame { private Container content; //fields private JPanel north, center, south; private JLabel label1, label2, label3, label4; private ActionListener li1, li2; private Button button, increaser, decreaser; private JTextField[][] inputs; private static int z; private int last; private static test window; private String fileName; private String one="Cancel"; private boolean cancelled=false; public test() //default-constructor { String s= JOptionPane.showInputDialog("How many different items do you want to order?:"); // askes how many fields users wants z= Integer.parseInt(s); //z=5; content = getContentPane(); // creates major panel content.setLayout(new BorderLayout()); north = new JPanel(); // creates north north.setLayout( new GridLayout(1, 1)); content.add(north, BorderLayout.NORTH); label1= createAndAddLabel("SKU",SwingConstants.CENTER, north); // creates four labels label2= createAndAddLabel("Description",SwingConstants.CENTER, north); label3= createAndAddLabel("Price",SwingConstants.CENTER, north); label4= createAndAddLabel("Quantity",SwingConstants.CENTER, north); center = new JPanel(); // creates center panel center.setLayout( new GridLayout(z,4)); content.add(center, BorderLayout.CENTER); south = new JPanel(); // creates south panel south.setLayout( new GridLayout (2, 1)); content.add(south, BorderLayout.SOUTH); inputs= new JTextField[z+10][4]; // makes a matrix of textfields last=z+10; for(int x=0; x