Tip Bank

DevX - Software Development Resource

Quickly find which OptionButton is selected

Often OptionButton controls are arranged in control arrays. To quickly find the index of the only selected OptionButton control you can use the following code: ‘ assumes that the control

DevX - Software Development Resource

Use a ListBox as a poor man’s grid

You can easily create columns of data in a ListBox control by setting its tab stop at appropriate positions. This way, you can use a ListBox control as a sort

DevX - Software Development Resource

Using VBA in Access 97 Development

When developing Access 97 applications using VBA, you may have problems porting your application to other computers. Run time errors can occur from basic VBA commands, especially when rolling out

DevX - Software Development Resource

Set Color of Tree Nodes

Using Swing, you can set the color of each node in Jtree. This is done by customizing your own TreeCellRenderer (overriding the DefaultTreeCellRenderer class), then calling the setBackgroundSelectionColor() method of

DevX - Software Development Resource

Testing for Closed Socket

Question: Is there any way to test if a socket is still open without writing to it? Answer: Despite being relatively easy to use, the Socket class is not implemented

DevX - Software Development Resource

Updating HTTP Headers

Question: In the first servlet we set the value for HTTP header as below: response.setHeader(“SessionKey”,”SessionValue”); In the next servlet we tried retrieving the above set header value as: request.getHeader(“SessionKey”); We

DevX - Software Development Resource

Use a VB Label as a Web Link

I like the idea of clicking on a VB label that looks like a Web anchor and pops up the Web browser pointing the user to the page. Here is