An applet for two-way chatting

This applet supports two-way chatting between users. It implements a client for the ConnectionBroker server, which can set up a relayed connection between a pair of such clients. There are really two functions: The user can register with the server as a client who is...

Client Server in Java

Set up a Server that will receive packets from a client and send packets to a client. Also set up a Client that will send packets to a server and receive packets from a server. [sourcecode...

Sketcher

Sketecher Java /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided strictly for the * * purpose of illustration. * * * * Please...

Bank Operations using Threads in Java

Bank Operation demo that uses Bank, Clerk and Account and Transaction objects to complete the operation. Actually this demo shows how you can use threads to perform the tasks intheir own capicity and utilise the maximum system resopurces. What we do is, we have two...

Calculator

A simple Java Calculator Java /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided strictly for the * * purpose of illustration. *...

Java color chooser Appelt

A ColorChooserApplet shows six scroll bars that the user can manipulate to set the red, gree, blue, hue, brightness, and saturation components of a color. A color patch shows the selected color, and there are six labels that show the numerical values of all the...

Java network chat Applet

This applet simulates a network chat, in which the user chats with someone over a network. Here, there is no network. The partner is simulated by a thread that emits strings at random. The point of the simulation is to show how to use a separate thread for receiving...

Drawing Pad

A simple Drawing Pad on which the user can draw some lines and shaps by using the mouse. Java /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made available as a service to our * * visitors...

Testing of two components MirrorLabel – MirrorLabel

This applet tests two custom components, MirrorLabel and MirrorLabel . It also tests the validate() method. The user can click a button to change the text on the components in the applet. Clicking another button will validate the applet. This will cause components...

Java ChatWindow for two way Chatting

A ChatWindow supports two-way chatting between two users over the Internet. The constructor for a ChatWindow requires a connected Socket. Messages are sent and received through this socket. The window has a text-input box where the user can type messages. When the...

Form

A Java Form class extended from JFrame with few buttons. These buttons show message dialog box when some actions are performed on them. Java /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is...

Double buffering in Swing – Java

An applet showing a red square that the user can drag with the mouse, on a background of lines. The user can drag the square off the applet and drop it. It will jump back to its starting point. This applet does uses double buffering, which is the default behavior in...