Tip Bank

DevX - Software Development Resource

Installing Own Colormap

Question: How can I make my Java application install its own colormap? Answer: The ability to allow a Java application to install its own colormap is not supported by the

DevX - Software Development Resource

JTable Headers

Question: I would like to add an icon to the header of a column of a JTable indicating the direction the column is currently sorted. Answer: It can be pretty

DevX - Software Development Resource

RMI method invocation

Question: I want my RMI server application to populate a java.awt.List with data on the client with a method invocation. What’s the best way to do this? Answer: When writing

DevX - Software Development Resource

Function Try Blocks

A function try block is a function whose body consists of a try block with its associated handlers (catch-statements). A function try block is probably most often used in a

DevX - Software Development Resource

Square Buttons in the JToolBar

When placing JButtons in the JToolBar, use gif icons that are 25 x 25 pixels. Then create a ToolButton class that sets the insets to zero so that the buttons

DevX - Software Development Resource

Alternative Java Coding Environment

For quick Java development, consider using MicroEdge’s Visual SlickEdit (http://www.slickedit.com) instead of an IDE. It recognizes and highlights Java keywords and inserts braces and indents code correctly. To make it

DevX - Software Development Resource

Alpha to Integer Conversion

C and C++ programmers are accustomed to using the atoi() function to convert strings to numeric integer values. Although Java doesn’t have an atoi() method, it provides the same capability

DevX - Software Development Resource

Finalization and Cleanup

Although Java does not provide a destructor as in C++, you can use an overridden finalize() method for similar purposes. The overridden finalize() method is invoked on an object before