The Latest

DevX - Software Development Resource

How can I add text to the graphs control

Question: I’m building some process control software and I need to addlabels, such as Upper Control Limit (UCL), into my chart. Answer: The graph control was added to PowerBuilder in

DevX - Software Development Resource

Reading Text File From Server

Question: I know I can’t read files from a local machine through my browser, but I can’t seem to read a file off my originating server either. There’s a way

DevX - Software Development Resource

Push Button Increments

Question: I have this declaration in init: pushButton1 = new Button(“0”). In the action class I try to increase the value from 0 through 9 every time I click the

DevX - Software Development Resource

Difference Between ‘float’ and ‘Float’ Types

Question: What is the difference between the types’float’ and ‘Float’ in Java? Answer: A variable of type float contains an IEEE single precision number,while a variable of type Float contains

DevX - Software Development Resource

Creating Applet to Ping IP Address

Question: I would like to create a very simple applet that pings anIP address and returns a message stating whether that IP is alive. Icouldn’t find any straightforward answers to

DevX - Software Development Resource

Creating a Dialog Box

Question: I’ve been to sites where dialog boxes appear. How can I create one?I also want to ask users for their names, and then to be able to tell how

DevX - Software Development Resource

Why doesn’t the window.close() method always work?

Question: Why doesn’t the window.close() method always work? Answer: In JavaScript 2.0, the window.close() method could be used to close any open browser window. People being the malicious animals that

DevX - Software Development Resource

How do I implement classic algorithms in C?

Question: Where can I find algorithms and data structures, techniques and programs that will better show me how they can be implemented using ANSI C? Other areas include Hashing, Heaps,

DevX - Software Development Resource

Creating TextField to Handle Passwords

Question: How do I create a TextField that handles a password?What are the KEY_ACTION events associated with it? Answer: The setEchoCharacter() method within the TextField class allows youto do precisely

DevX - Software Development Resource

Using Java to Control System Functions

Question: I would like to be able to browse my server and havean applet/program that would mimic the functions of,say, the control panel on a Macintosh.Would I needto write a

DevX - Software Development Resource

Will Downloading Java Applets Fill Hard Disk?

Question: Constant downloading and fear of accumulating masses of useless files is turning me off on Internet. My concept of Java is that exe files, etc., will be on the

DevX - Software Development Resource

Can Java Communicate with Local Serial Port?

Question: Is it possible to have Java talk to a localserial port on a machine, for example,COM1 or COM2 on a PC?Is there a way to do this without nativemethods,

DevX - Software Development Resource

Can I Add Menu Bars to Applets?

Question: Is it possible to add a menu bar to an applet without usingFrame as the container?Also, is it possible to show a Frame without a new window poppingup?I am

DevX - Software Development Resource

Responding to Mousedown Event in TextField

Question: How can I respond to a mousedown event in a TextField? Answer: From the Java 1.0.2 API specs:“In Java 1.0, the AWT does not send mouse or focus events

DevX - Software Development Resource

How to Fix Drop-down Box Conflict in Applet

Question: I am unable to run an applet and use a drop-downbox on the same page when using Netscape. The page hasmassive flickering and the applet will sometimes run. Theapplet

DevX - Software Development Resource

Equivalent of void myRoutine in Java?

Question: I know that in order to pass something byreference, you pass an already-created objectand let the subroutine modify the contents ofthat object. Unfortunately, the Integer, String,etc. objects don’t allow

DevX - Software Development Resource

Launching Another Application from Java

Question: Is it possible to launch another application from aJava application (not an applet)? Answer: Yes. There are two classes of interest for performingsystem level functions such as this: java.lang.Runtime

DevX - Software Development Resource

Appending to a File

Question: How can I append to a file in Java?The file is ASCII. It exists. The program hasrights to the file. I just need to add to the endof the

DevX - Software Development Resource

How to calculate sqrt()

Question: How do you calculate sqrt()? Answer: Of course the best way to compute square roots is to useMath.sqrt(),but I assume your question is academic. I’m not sure of the

DevX - Software Development Resource

Passing Data Between Two Threads

Question: I am new to Java and am currently trying toassociate idioms and techniques from otherlanguages/environments with like capabilities inJava. Specifically, I am trying to determine howto perform inter-thread and