protected void change()
	{
		Integer tickets = ticketsBox.getValue();
		Integer friends = friendsBox.getValue();
		Integer winners = winnersBox.getValue();
		Integer limit = limitBox.getValue();
		
		if (validate(tickets, 1000, 1, ticketsBox) &&
			validate(winners, tickets, 1, winnersBox) &&
			validate(limit, 100, 1, limitBox) &&
			validate(friends, tickets, 1, friendsBox))
		{
			if (tickets != null && friends != null && winners != null && limit != null)
			{
				resultLabel.setText("");
				if (serverCheckBox.getValue())
				{
					GwtLotteryCalculatorAsync asyncCalculator = GWT.create(GwtLotteryCalculator.class);
					busyImage.setVisible(true);
					asyncCalculator.calculate(tickets, winners, friends, limit, new AsyncCallback<Double>()
					{
						@Override
						public void onFailure(Throwable caught)
						{
							Window.alert("Failed to communicate with server");
							busyImage.setVisible(false);
						}
	
						@Override
						public void onSuccess(Double result)
						{
							updateResult(result);
							busyImage.setVisible(false);
						}
					});
				}
				else
				{
					LotteryCalculator calculator = new StandardLotteryCalculator();
					double result = calculator.calculate(tickets, winners, friends, limit);
					updateResult(result);
				}
			}
		}
	}