April 8, 1997

How do I get Java to return the ASCII value of a character?

Question: How do I get Java to return the ASCII value of a character? Answer: Java characters are encoded using Unicodes, two-byte codes that enable coding of non-Roman characters. Fortunately, Unicodes for Roman characters have the form 0x00yz where yz is the usual ASCII code.Second, due to Java’s stricter typing

Saving RichTextBox as Plain Text

Question: How can I output straight ASCII text from the Rich Text Box control, and NOT Rich text? Answer: The SaveFile method of the RichTextBox control can be called with an additional argument: filetype. If you call SaveFile as follows, it will save your text without any RTF tags:RichTextBox.SaveFile “testfile.txt”,

Getting the IP Address of a workstation by using Java

Question: How can I simply get the IP address of a workstation by using Java so that I can display it and run another application ? Answer: The java.net.InetAddress class allows Java programs to do this.Given a host name, one can use the getByName method to find out itsIP address:

How do I jump to a URL from a window (frame)?

Question: My problem is that the main applet serves as a sort of navigator page. When the user clicks a certain mouse xy the applet opens a new window (frame). This new frame contains some more graphics and servers as a sub-navigation window. When the user clicks a mouse xy

Logging users’ e-mail addresses

Question: Is there a way to log my users’ e-mail addresses using Java? I thought of using a mailto form but the user would have to press a button, making this inconvenient and messy for me to access! I am getting about four hits a day on a site that

Basic Java Syntax

Question: Here’s some basic Java syntax, with explanations: Answer: OBJECTS, CLASSES and INSTANCESA Java object is a container that holds variables and functions (Java programmers call functions “methods”). Since (references to) Java objects can be stored in variables, Java objects can also hold other Java objects.There are two types of