Tip Bank

DevX - Software Development Resource

Export Data to ISAM Databases

Use this code to get data out to different formats without requiring a complete copy of the DBMS on the user machine. Create a new project with a command button,

DevX - Software Development Resource

Highlight Text Automatically

When the focus of a graphical user interface shifts to an empty TextField, you type the desired input and step to the next one. But if the TextField is not

DevX - Software Development Resource

Stabilized Scrollbars

Numerous awt Components provide their own Scrollbars when needed. However, when you first employ one explicitly, perhaps for adjusting colors, you may encounter a frustrating problem. On some platforms the

DevX - Software Development Resource

Enable Pasting to Spreadsheets

A TextArea is ideal for presenting tabular results from an applet or application. It provides Scrollbars automatically when the text exceeds the available screen space. But despite careful use of

DevX - Software Development Resource

Avoid Premature Dialog Closure

On some platforms, hitting the “Enter” key to terminate input to a TextField will cause the whole dialog box to disappear, as if you had clicked an “OK” button. If

DevX - Software Development Resource

Displaying Help from an Application

It’s tempting to use an HTML file to provide help for a Java application, but how do you know which browser is installed on the run time platform and where

DevX - Software Development Resource

Forward Declarations

There are circumstances in which classes refer to one another: //file: bank.hclass Report{public:void Output(const Account& account); // compile time error; class Account is not declared yet};class Account {public:void Show() {Report::Output(*this);}};

DevX - Software Development Resource

Unnamed Function Arguments

When an argument of a function is not used anymore in the function body (in an upgrade, for example), it needn’t be removed from the function’s argument list. It can

DevX - Software Development Resource

Beware of Aliasing

Whenever your class contains pointers, references, or handles, you need to define a copy constructor and assignment operator. Otherwise, the compiler-generated copy constructor and assignment operator will result in aliasing,