April 7, 2000

Determining the Top Level Frame

Question: I have developed a custom AWT component that can be placed at any level in a component hierarchy. How can it determine the top level Frame in the hierarchy?


Question: How do I access the contents of a JPasswordField to see if it matcheswith the correct password? Answer: Before using a class, it helps to examine all of the

Select All Checkboxes

Question: I have several checkboxes and I want one checkbox tocause all of the checkboxes to be selected when it is selected. Howcan I do this? Answer: Even though the


Question: Is there any method (MFC, Win32) to get the contents of the systemvariable “PATH”? Answer: Sure there is. Use the standard function getenv() for this purpose: #include { char

Mouse Click Coordinate

Question: I know how to detect a mouse click with a MouseListener, but how doI obtain the coordinates associated with the click? Answer: If you already know how to detect

Database Field Types

Question: How do I get a string representation of a database field using JDBCregardless of its type? In other words, I have to use the getInt(),getDate(), getString(), etc., to get

RE: Date Arithmatic in Java

Question: I previously asked a question that may not have been worded as clearlyas possible and you answered something slightly different from what Iwas looking for. I want to know


Question: When I use InetAdress.getAllByName(String host) on my workstation,I get two IP addresses. One is for the LAN connection and the other isfor the dialup connection. I need to get

Enumeration Types

Question: Can you make an array of enumeration types?If so, how do you do it? Answer: Yes you can, and it is very simple: enum direction { Up, Down};direction arr[10];