public static void beginButtonAction() {
		running = true;
		factories = new ArrayList<Factory>();
		customers = new ArrayList<Customer>();
		factoryCount = maxFactoryCount;
		customerCount = maxCustomerCount;
		factoryClock = new Signal();
		factoryStore = new FactoryStoreSignal();
		
		// construct store
		customerStore = new StoreCustomerSignal();
		store = new Store(factoryStore, customerStore);
		customerStore.registerStore(store);
		
		// construct factories
		for (int i=0; i<factoryCount; i++) {
			factories.add(new Factory(i+1, factoryClock, factoryStore, 10000));
		}
		
		// construct customers
		for (int i=0; i<customerCount; i++) {
			customers.add(new Customer(i+1, customerStore));
		}
			
		// start threads
		for (int i=0; i<factories.size(); i++) {
			(new Thread(factories.get(i))).start();
		}
		
		(new Thread(store)).start();
		
		for (int i=0; i<customers.size(); i++) {
			(new Thread(customers.get(i))).start();
		}
		
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					displayFrame = new DisplayFrame();
					displayFrame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}