
Split Strings Cleanly
The Split function is great for parsing strings, but what happens when a string has more than one consecutive delimiter? It might seem odd that Split() returns empty substrings as

The Split function is great for parsing strings, but what happens when a string has more than one consecutive delimiter? It might seem odd that Split() returns empty substrings as

Applets use a default background of gray, which may not be visually appealing to you. Besides, gray may be the background color of the web page on which the applet

Modern Java IDEs like Symantec’s Visual Cafe and Inprise’s JBuilder offer advanced applet debugging facilities. However, if you develop your applets using only the freely distributed JDK, it might be

It sometimes makes a lot of sense to throw an exceptionfrom the constructor of a class; look at constructors ofthe java.net.URL for an example. But what do we do if

A call to repaint() will schedule a component to be repainted when the gui thread is free. But what if we can’t wait till then? Well, we can use the

Applets are executed within a web browser, and there’s an easy way to load show a specific URL. 1. Get a reference to the applet context 2. Call the showDocument

Sometimes, it is useful to know which fonts are installed. This can differ from one Java Virtual Machine (JVM) implementation to another. The following code displays the names of all

Sometimes, it is useful to obtain a binary representation of integer, or a character. For example, we might want to represent the character ‘a’ by its binary 01100001, the letter

The java.lang.Math package has useful trigonometric functions such as: public static native double sin(double a) public static native double asin(double a). So, if we write code: double x = 90;