devxlogo

Tip Bank

TextField Max Characters

Question: How do I restrict the number of characters to be entered in a TextField? Answer: Setting a maximum character count is not a built-in function ofTextField. You have to

Preprocessor Support

Question: Is there something similar to the C/C++ compiler directive #ifdef,#define, and #endif in Java? I would like to compiledebugging code conditionally. Answer: This is one of the first questions

Return Values from Java to Unix

Question: I am calling a java program from a Unix script and passing threeparameters. Once the Java program is done, I want to return two valuesback to the Unix program

DWORD Equivalent

Question: I’m trying to translate from VC++ to Java. Can you declare a variableDWORD in Java? If not, what is the Java equivalent? Also, what is theequivalent for HINSTANCE? Answer:

Copying Files

Question: Is there a simple way of copying a file from one directory to another? Answer: There is no predefined convenient method for copying a file from oneplace to another.

Standard Input Exception

Question: Why do I have to catch an exception when I use System.in.read()? Answer: System.in is an InputStream, and like any InputStream, an I/O errormay occur when you read from

HTML Pop-Up Menus Rendering Issues

Pop-up menus in normal HTML pages are usually implemented using Layers (DIV tag). However, the leading browser applications in the market have this known problem with layers: if a pop-up

Concatening Columns Using AS

Question: I’m trying to retrieve the “firstname” and “lastname” fields from a SQL Server database, place them into a column called “fullname” using the AS statement. When I simply retrieve