public void actionPerformed(ActionEvent e){
				
			//When the upload button is pressed
			if (e.getSource()==generateButton) {
				
				treasureModel.clear();
				
				if((Integer) levelSpinner.getValue() > 30 || (Integer) levelSpinner.getValue() < 1){
					JOptionPane.showMessageDialog(
							RunGenerator.this, 
							" Selected level must be between 1 and 30.",
							"Error: Invalid Level",
							JOptionPane.INFORMATION_MESSAGE);
				} else {
					Random rand;
					
					int coin;
					int good;
					int item;
					List<String> output = new ArrayList<String>();
					
					int level = (Integer) levelSpinner.getValue();
						
					rand = new Random();
					CoinGen cg = new CoinGen();
					GoodGen gg = new GoodGen();
					ItemGen ig = new ItemGen();
						
					coin = (rand.nextInt(100) + 1);
					cg.doGenerate(level, coin);
					output.add(cg.getCoins());
					
					good = (rand.nextInt(100)+1);
					gg.doGenerate(level, good);
					for(String x:gg.getGoods()){
						output.add(x);
					}
					
					item = (rand.nextInt(100)+1);
					ig.doGenerate(level, item);
					for(String x:ig.getItems()){
						output.add(x);
					}
					
					for(String x:output){
						treasureModel.addElement(x);
					}
				}		
			}
		}