devxlogo

December 15, 2001

How to Set an Image as Background to a Frame

After all component settings, create an ImageIcon object with your desired image. Using this object, create a JLabel. Add the Jalbel to the lowest LayeredPane of the JFrame. Finally, add

Checking for Null After New (2)

Normally, you should not check for null after creating an object. MyObject o = new MyObject(); This check is not required in Java because ‘new’ is not allowed to return

Test for Alpha Characters Only, Part II

I have a much simpler form for the IsAlphaNum function: Public Function IsAlphaNum(ByVal sString _As String) As BooleanIf Not sString Like “*[!0-9A-Za-z]*” _Then IsAlphaNum = TrueEnd Function You can modify

Test for Alpha Characters Only

Although VB has an IsNumeric function, it has no IsAlpha function. Use this routine whenever you want to determine whether a character or string of characters is alphabetic (A-Z or

Sort and Reverse—Sort a ListView

This routine performs the standard column sorting on a ListView control found in many commercial applications, such as Windows Explorer and Outlook. Using this routine, the ListView sorts itself automatically