Tip Bank

DevX - Software Development Resource

Avoid Instantiability of Utility Classes

There are times when almost every programmer comes up with a class that consists only of public static methods. Usually these are some kind of utility classes, which do not

DevX - Software Development Resource

Appending Data to an Existing File

There is a constructor in the java.io.FileOutputStream class which can be used to append data to an existing file. Usage:public FileOutputStream(String name, boolean append) throwsFileNotFoundExceptionwhere:name – the file nameappend –

DevX - Software Development Resource

How to Make a Swing Component Appear and Disappear

Here’s a very short bit of code that will make a StatusBar hide or show, accordingly: public void viewStatusBar() { /* Hide or show the statusbar */ StatusBarPane().setVisible(!(StatusBarPane().isVisible()));} Just have

DevX - Software Development Resource

Encapsulate Member Objects

Objects frequently contain member objects that need to be exposed.Often, these are not correctly encapsulated, which could lead to problems that are difficult to track down.Consider a Circus object, which

DevX - Software Development Resource

Communicating With XML Files

Start a new VB project. Add a form (or use the default one). Then, add these four buttons on the form: create (cmdCreateFile), read (cmdRead), append (cmdAppend), and delete (cmdDelete).