@Override
public void onReceive(Object message) throws Exception {
if (Update.equals(message))
sensor.sendOneWay(WeatherSensor.Get, getContext());
else if (message instanceof WeatherData) {
final WeatherData data = (WeatherData) message;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
temperatureLabel.setText(String.valueOf(data.temperature));
humidityLabel.setText(String.valueOf(data.humidity));
}