Implementing a Simple Event Notifier : ChoiceFormat « I18N « Java Tutorial






import java.util.Observable;
import java.util.Observer;

class MyModel extends Observable {
  public synchronized void setChanged() {
    super.setChanged();
  }
}

public class Main {
  public static void main(String[] argv) throws Exception {
    MyModel model = new MyModel();
    model.addObserver(new Observer() {
      public void update(Observable o, Object arg) {
      }
    });
    model.setChanged();
    Object arg = "new information";
    model.notifyObservers(arg);
  }
}








13.10.ChoiceFormat
13.10.1.Choice Format
13.10.2.Incrementing a Double by the Smallest Possible Amount
13.10.3.Get the smallest double greater than d
13.10.4.Implementing a Simple Event Notifier