March 20, 1999

Determine Absolute Cursor Coordinates

When a component event such as a mouse click occurs, Java provides the cursor coordinates relative to the top left corner of the component in which the event took place.

Friends Should be Declared Public

The compiler ignores the access specifier of friend functions. However, you should declare them as public to make the code readable: bool operator ==( const Date & d1, const Date&

Dynamically Create Selection Box Options

You can create selection box options dynamically using JavaScript 3.0’s Option object. The syntax for its constuctor is: Option(text, value, [default selected], [selected]) Here is an example:

Empty Exception Specification

Some programmers tend to add an empty exception specification to constructor destructor, assignment operator, and copy constructor of a class: class C {public: C() throw(); ~C() throw(); C(const C&) throw();