Setting textfield focus
Question: I have an initially disabled TextField on a frame.When the user clicks a specific button the TextField is enabled. How do I set the input focus to the TextField
Question: I have an initially disabled TextField on a frame.When the user clicks a specific button the TextField is enabled. How do I set the input focus to the TextField
All the classes in sun.* that accompany the Sun JDK are provided assupport classes that are used to implement specific sets of functionalityfor the core JDK classes. The classes in
The Java core API possesses a method equivalent to the C atoi() function in Java. The java.lang.Integer class contains a method called parseInt()which will convert a String into an int.
The java.util package contains a class called Random which you can useto generate random numbers. A Random object represents a repeatingpseudo-random sequence of numbers. You can either fetch the next
The java.lang.reflect package provides an Array class through whichthe values of an array can be accessed. It is usually more effectiveto cast the array after it has been obtained through
There is no limit to the number of access specifiers (private, protected, and public) a class can have. When large classes are declared, it is useful to repeat the access
If you are trying to make an alert box that displays a message when the user passes the mouse over an image, keep in mind that unlike Microsoft Internet Explorer,
C programmers are used to dealing with multidimensional arrays as chunksof contiguous memory which can be accessed through pointer arithmetic.In Java, an array is an actual object, and a multidimensional
Aside from fitting well with the Microsoft environment, creating components and component based software also works well with the management and tracking of development teams. Components naturally divide into manageable
On NT, do you ever wonder why Performance Monitor starts up blank on some computers, and others have process monitored automatically upon start up? Well, Performance Monitor first looks for
Naming standards apply to areas besides only those of developers and source code. All areas of a software solution benefit under a consistent naming process. SQL Server table names and
You can improve SQL server performance if you avoid creating tables in a monolithic fashion. By monolithic I mean tables that have dozens and dozens of fields that are not
The object model of C++ ensures that each object instance gets its own copy of data members (except for static ones). On the other hand, all instances of a base
The exception handling (EH) mechanism disables the possibility of passing a thrown exception by reference or through a pointer. This is due to the way this mechanism is implemented: when
When you port pure C code to a C++ compiler, you may discover slight performance degradation. This is not a fault in the programming language or the compiler, but a
To make a form use a small toolbar-style title bar, set the form’s WS_EX_TOOLWINDOW extended style: Declare Function GetWindowLong Lib “user32” _ Alias “GetWindowLongA” ( _ ByVal hwnd As Long,
Functions having a long list of arguments such as: void retrieve(const string& title, const string& author, int ISBN, int year, bool& inStore); can become a maintenance problem, since their argument
A binary search tree can be useful when you have to traverse a lot of data in sorted order. As this CBinarySearchTree class demonstrates, you can implement binary search trees
Have you ever tried to create tools on a toolbar using an image list, only to find that you must detach the toolbar from the list and reset all the
Try this routine to select or deselect all items in a list box. Add a list box to your form with the MultiSelect property set to Simple or Extended, and
Sometimes you might need a browser to keep reloading the latest version of a page automatically. A good example of this is a page that displays an image from a
You can use the browser’s status bar to give users extra information about the page that they’re viewing. Here’s an example of how to do it by using a JavaScript
Use this code to create a tree of folders on Windows 95 or NT 4.0 in one line: Private Declare Function _ MakeSureDirectoryPathExists Lib “IMAGEHLP.DLL” _ (ByVal DirPath As String)
If you use HTML tables to lay out your pages, it’s worth knowing about two properties of the tag that help you control the way table cells behave. The CELLSPACING
You can automatically redirect visitors from one page to another in several ways. Here’s a flexible method that uses JavaScript to modify the href property of the location object in
If your Web site moves to a new address, you won’t want to lose all the people who have bookmarked the old one. Luckily there are several ways to create
Question: I’m trying to create a padding effect around this box of text that glides on to the screen from the right. I need to have it so that the
Starting with Visual Basic 4.0, you can add conditional compilation statements and use them to create different versions for 16-bit and 32-bit environments or to call debugging DLLs while testing
Sometimes it is useful to know if your program is running within Visual Basic’s Integrated Development Environment (IDE) or as a standalone EXE. This routine returns True if the program
You can read and write arrays quickly from files using Put and Get. This approach is faster than reading and writing the array one entry at a time: Dim arr(1