public MainFrame() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setVisible(true);
		setSize(800, 600);
		setLocationRelativeTo(null);
		contentPane = new JPanel();
		contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.X_AXIS));
		JPanel listPanel = new JPanel();

		textField = new JTextField();
		textField.addKeyListener(new KeyListener() {

			public void keyTyped(KeyEvent arg0) {

			}

			public void keyPressed(KeyEvent e) {
			}

			public void keyReleased(KeyEvent e) {
				SearchList(textField.getText());
			}
		});
		listPanel.setLayout(new BoxLayout(listPanel, BoxLayout.Y_AXIS));
		listPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
		listPanel.add(Box.createHorizontalGlue());
		listPanel.add(textField);
		textField.setColumns(10);
		textField.setMaximumSize(new Dimension(100000, 60));

		listPanel.add(Box.createRigidArea(new Dimension(0, 5)));

		refreshList();
		list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		JScrollPane listScroller = new JScrollPane(list);

		listPanel.add(listScroller);

		removeItembtn = new JButton("Remove Selected Item");
		removeItembtn.setAlignmentX(Component.CENTER_ALIGNMENT);
		removeItembtn.addActionListener(this);
		removeItembtn.setMaximumSize(new Dimension(100000, 80));
		addToBillbtn = new JButton("Add to Bill");
		addToBillbtn.addActionListener(this);
		addToBillbtn.setMaximumSize(new Dimension(100000, 80));
		addNewItembtn = new JButton("Add Item to List");
		addNewItembtn.setMaximumSize(new Dimension(100000, 80));
		addNewItembtn.addActionListener(this);
		addNewItembtn.setAlignmentX(Component.CENTER_ALIGNMENT);
		modifyItembtn = new JButton("Modify Item");
		modifyItembtn.setAlignmentX(Component.CENTER_ALIGNMENT);
		modifyItembtn.addActionListener(this);
		modifyItembtn.setMaximumSize(new Dimension(100000, 80));
		listPanel.add(removeItembtn);
		listPanel.add(modifyItembtn);
		listPanel.add(addNewItembtn);
		quantityPanel = new JPanel();
		quantityPanel.setLayout(new BoxLayout(quantityPanel, BoxLayout.X_AXIS));
		quantityPanel.setMaximumSize(new Dimension(100000, 80));
		quantityLabel = new JLabel("Quantity");
		quantityTextField = new JTextField();
		quantityTextField.addKeyListener(new KeyAdapter() {
			public void keyTyped(KeyEvent e) {
				char vChar = e.getKeyChar();
				if (!(Character.isDigit(vChar)
						|| (vChar == KeyEvent.VK_BACK_SPACE) || (vChar == KeyEvent.VK_DELETE))) {
					e.consume();
				}
			}
		});
		quantityPanel.add(quantityLabel);
		quantityPanel.add(quantityTextField);
		quantityPanel.add(addToBillbtn);

		listPanel.add(quantityPanel);
		table = new JTable();
		JPanel billPanel = new JPanel();
		billPanel.add(new JScrollPane(table));
		billPanel.setLayout(new BoxLayout(billPanel, BoxLayout.Y_AXIS));
		billPanel.add(Box.createHorizontalGlue());
		billPanel.setPreferredSize(new Dimension(400, 500));

		JPanel toolPanel = new JPanel();
		toolPanel.setLayout(new BoxLayout(toolPanel, BoxLayout.X_AXIS));
		removeFromBill = new JButton("Remove from bill");
		removeFromBill.setAlignmentX(Component.CENTER_ALIGNMENT);
		removeFromBill.addActionListener(this);
		removeFromBill.setMaximumSize(new Dimension(100000, 60));
		toolPanel.add(removeFromBill);
		saveBill = new JButton("Save Bill");
		saveBill.setAlignmentX(Component.CENTER_ALIGNMENT);
		saveBill.addActionListener(this);
		saveBill.setMaximumSize(new Dimension(100000, 60));
		toolPanel.add(saveBill);
		loadBill = new JButton("Load Bill");
		loadBill.setAlignmentX(Component.CENTER_ALIGNMENT);
		loadBill.addActionListener(this);
		loadBill.setMaximumSize(new Dimension(100000, 60));
		toolPanel.add(loadBill);
		sumLabel = new JLabel("SUM:");
		sumLabel.setAlignmentX(Component.CENTER_ALIGNMENT);
		sumLabel.setMaximumSize(new Dimension(100000, 60));
		toolPanel.add(sumLabel);
		sum = new JLabel("" + 0);
		sum.setAlignmentX(Component.CENTER_ALIGNMENT);
		toolPanel.add(sum);
		billPanel.add(toolPanel);

		splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, listPanel,
				billPanel);
		contentPane.add(splitPane, BorderLayout.CENTER);
		splitPane.setResizeWeight(0.3);
		splitPane.setContinuousLayout(true);
		setContentPane(contentPane);
		pack();

	}