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
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
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
Question: How do I include reserved characters suchas double-quote in the strings passed to an applet from a PARAM tag?Standard SGML entities don’t work; the UNIX backslash method doesn’t work.
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
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,
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
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
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
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,
Question: How do I refer to/utilize the getImage(…) method whenusing it in an application, as I can only get it to work for an applet? Answer: To display images in
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
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
Question: How can I use JavaScript functions defined in an external file? Answer: When JavaScript and the tags, you can save it in a separate file and add a src
Question: Can JavaScript be used to access the client’s printer? Answer: No. JavaScript was designed so that malicious JavaScript programmers would have very little power to make their victims miserable.
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
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
Question: Is there a way to determine the number ofinstantiated objects of a certain class? Answer: Unfortunately, there are no methods of class Object orClass thattrack the number of extant
Question: I want a copy of an instance not a reference, e.g.(Image). Iknow of the clone method, but not many classes have it. Along those lines,does Java pass objects to
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
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
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
Question: I am trying to write a Java applet which canretrieve data from the user and then write itto a file on the server. Unfortunately I do nothave the access
Question: I am trying to create a Java routine to play an .au file whenit starts up (I want to then add this as a startup to my Web page).I
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
Thread.interrupt()method’s purpose?
Question: What is the purpose of the Thread.interrupt()method? I expect that if I call the interrupt()method of a sleeping thread, anInterruptedException will be thrown. Here is aquick code sample showing
Question: How do I use the .net classes to log on to a mailserver and request, say, the number of new mailmessages? Or send a message?Just POP3/SMTP. An example would
Question: This may be too vague, but:I spawn a thread (after a button click) which bringsup a new window. This works great on my PC runningNetscape 3.0 and Internet Explorer,
Question: I have a server application listening for clientapplets to connect. The server spawns a new thread each timea connection to a client is established. I want to keeptrack, i.e.
Question: How do you lock a file in Java to prevent simultaneous multipleaccesses? Answer: If you’re concerned about simultaneous access by independent processes,you’ll have to rely on the host OS
Question: What is the maximum size of a string array I can have in my applet?I am trying to store some stock prices in a string array after reading themfrom