July 14, 1999

Java History

Question: I just want to know where Java came from. Can you give me a history of this language? Answer: I can give you a brief history. Java started out as a researchproject in the early ’90s at Sun Microsystems, led by James Gosling. He was working on a language

SQL Query Optimizing Tips

Question: I just wanted to know if you could share some techniques on how to optimize SQL queries (for example, inner join first before performing some steps, do not use computations, etc.). Answer: Since this borders on a black art, the only advice I can offer is this: depending on

Window Resize Event

Question: How can I detect that a window has been resized?I can detect events such as WindowIconified,WindowDeiconified, WindowOpening, WindowClosing, etc., but not the resize event. Answer: Figuring out how to detect a window resizing isn’t immediately obviousbecause you might expect the event to be represented by a WindowEvent.In fact, window

Program Fails to Compile

Question: Every time I try to compile a program, I get “Error(0) Duplicate Resources” and the program stops. I understand that this is a linker error of some kind, but I don’t know what. Can you help? (I am using Delphi 3 Standard Edition.) Answer: Use Windows Explorer to go

Causes for an InstantiationException

Question: What can cause an InstantiationException? Answer: An InstantiationException is thrown when you try to create an instance of a class with Class.newInstance() and the class cannot beinstantiated. This could be because there is an uninstantiable interface or abstract class. If the constructor is not public, thenan IllegalAccessException will be

A Simple Right Mouse Click

Question: I am learning Delphi 4. I’m trying to create a program that can distinguish between a right and left mouse click and perform an operation based on which button has been pressed. The tutorial I’m reading uses the TMouseButton parameter inside the procedure. It looks like this: procedure LineForm.FormMouseDown(Sender:

Displaying a Record Number for a Table

Question: I use an InterBase database with an alias made in BDE. I want to display the record number for a table when I navigate through the records. Your solution .RecNo always returns –1 because it is a TDataSet.RecNo. Is there another solution? Answer: There is no such thing as

Returning the Root Drives

Question: Can you tell me how to get the root drives on a system? Answer: The 1.0 and 1.1 version of the Java APIs did not include a means ofdetermining the root drives or partitions on a system. During thedevelopment of the Swing APIs, it became clear such a function

Conditional Semaphores

Question: I am trying to create a queue that will be emptied by multiple threads simultaneously. In C/C++ this requires the use of a conditional semaphore to signal that the queue is empty/not empty. How can a Condition be implemented in Java? Answer: Conditions are implemented in Java using the

No more posts to show