@Override
	public void actionPerformed(ActionEvent arg0) {
		Object event = arg0.getSource();
		
		int row = 0;
		int col = 0;
		int bombP = 0;
		
		if(event == confirm){
			try{
				row = Integer.parseInt(textRow.getText());
			}catch(NumberFormatException e){
				JOptionPane.showMessageDialog(this, "All Fields need to be filled with integers!");
				this.textRow.setText("10");
			}
			try{
				col = Integer.parseInt(textCol.getText());
			}catch(NumberFormatException e){
				JOptionPane.showMessageDialog(this, "All Fields need to be filled with integers!");
				this.textCol.setText("10");
			}
			try{
				bombP = Integer.parseInt(textBombs.getText());
			}catch(NumberFormatException e){
				JOptionPane.showMessageDialog(this, "All Fields need to be filled with integers!");
				this.textBombs.setText("10");
			}
			
			
			
			
			String errMessage = null;
			
			if(row > 0 && col > 0 && bombP > 0 && bombP < 101){
				con.field.initialize(row, col);
				con.segregateBombs(bombP, errMessage);
				synchronized (this){
					this.notify();
				}
			}			
		}	
	}