July 6, 1998

Visual J++ 1.1 and Java 1.1

Question: I am using MS Visual J++ 1.1 1997 and it doesn’tcontain the java.util.Calendar class and java.text.* packages that you reference in the answer to another question. How do I obtain these classes? The software that I have claims to be version 1.1, and your answer states that they are

Offscreen buffer

Question: I want to create an offscreen buffer in a Java application, but I don’t know how. Answer: You can create an offscreen buffer by usingthe createImage(int,int) in java.awt.Component.This is most commonly done when subclassing theCanvas class. Let’s say you wanted to createa double buffer for the contents of a

Converting String to double

Question: How can I convert a String to a double and backagain? Answer: You can use the java.text.NumberFormat classto convert a String to a double and back again.Use the parse(String) method to convert toa double. This will actually return ajava.lang.Double wrapper class instance, soyou need to use doubleValue() to fetch