May 30, 1998

Coming Events

If you are extending an AWT Component, such as a Canvas to write your own control, then you will probably want it to trigger events that the super class does not handle. It is not hard to add the necessary logic, so lets use an ActionEvent as an example. First

Which Browser is Running Me?

While Java’s ability to run on numerous computer platforms makes a developer’s task easier, it is sometimes necessary to customize code to match the abilities of the environment. A good example is the need to tailor the generation of Dynamic HTML syntax to the brand of browser which will be

Some Objects Are More Equal Than Others

A Vector is a convenient tool for keeping track of a set of objects, particularly when you don’t know in advance how many will be in the set. You can find out whether an object is present in the set using one of three methods: contains, indexOf and lastIndexOf. But

Overloading postfix and prefix ++

For primitive types the C++ language distinguishes between ++x; and x++; as well as between –x; and x–;For objects requiring a distinction between prefix and postfix overloaded operators, the following rule is used: class Date { //… public: Date& operator++(); //prefix Date& operator–(); //prefix Date& operator++(int unused); //postfix Date& operator–(int

Assignment operator is not inherited

Unlike ordinary base class member functions, assignment operator is not inherited. It may be re-defined by the implementer of the derived class or else it is automatically synthesized by the compiler, so there’s not much point in declaring it virtual.