Web Hosting Tomcat, Java, JSP, Servlets, J2EE, PHP, MySQL

Cheap web hosting provider

30
Oct

a List. Planning Your Event-Handling Strategy A good

LOAD_FILE Generated when a File is loaded. LOST_FOCUS Generated when a Component loses the focus. MOUSE_DOWN Generated when the mouse button is pressed down. MOUSE_DRAG Generated if the mouse moves while being clicked (dragged). MOUSE_ENTER Generated when the mouse enters a Component. MOUSE_EXIT Generated when the mouse leaves a Component. MOUSE_MOVE Generated when the user moves the mouse without pressing the button. MOUSE_UP Generated when the mouse button is released. PGDN Generated when the key is pressed. PGUP Generated when the key is pressed. RIGHT Generated when the right arrow key is pressed. SAVE_FILE Generated when a file is saved by the AWT. SHIFT_MASK Indicates that the key is down. UP Generated when the up arrow key is pressed. Implementing the Client Chat Room Applet Code First, let s get rid of all of the mundane steps. The ChatClient.java Startup File Start with a file called ChatClient.java and put this skeleton in it. It includes all of the global variables we will eventually need. You may not recognize them all now, but don t worry, you will. import java.applet.*; import java.net.*; import java.lang.*; import java.io.*; import java.awt.*; import java.util.*; public class ChatClient extends Applet { /* network stuff first */ Socket sock; DataInputStream dis; PrintStream ps; String name, theHost; int thePort; /* now the Thread */ Thread kicker = null; /* And finally the AWT stuff */
Note: If you are looking for good and quality webspace to host and run your java application check Actions java hosting services

Comments are closed.

Home | About Us | Compare Plans | Standard Hosting | Business Hosting | Java Tomcat Hosting | Support | FAQ | Order Now!

Powered by Omnicus java hosting services. All rights reserved.
Entries (RSS) and Comments (RSS).