Tip Bank

DevX - Software Development Resource

Creating Radio Buttons Using Swing

Radio buttons behave in the same mutually exclusive way in Swing and the AWT. However, the way that you create a set of radio buttons differs significantly between Swing and

DevX - Software Development Resource

Creating Hidden Buttons with Swing

Using Swing, you can easily create hidden buttons similar to the Back button used in Netscape Communicator 4. Hidden buttons look like normal graphic elements on the screen until you

DevX - Software Development Resource

Infrastructure Functions Should Trust Their Users

Infrastructure functions that are used extensively should adopt the “trust the programmer” policy by not performing additional error checking. This policy is widely used in C/C++ standard libraries. For example,

DevX - Software Development Resource

An Object Size May Never Be Zero

An empty class doesn’t have any data members or member functions. You’d think that the size of an object of such a class would be zero. However, the Standard states

DevX - Software Development Resource

Koenig Lookup

Andrew Koenig devised an algorithm for resolving namespace members’ lookup. This algorithm is used in all standard-conforming compilers to handle cases like the following: namespace MINE { class C {};

DevX - Software Development Resource

Close All Open Recordsets and Databases

This small subroutine iterates through and closes all databases in the Databases collection of the Workspaces object. For each database in the collection, it iterates through each Recordset and closes

DevX - Software Development Resource

Return to a Previous Location in Your Code

To return to a previous location in your code, press Ctrl+Shift+F2. This way you don’t need to set bookmarks. VB only keeps track of the last eight lines of code