Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

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 information.

The applet has an input box where the user enters messages. When the user presses return, the message is posted to a text area. In a real chat program, it would be transmitted over the network. When a (simulated) message is received from the other side, it is also posted to this text area.

Beginning C++23
Kickstart your coding journey with Beginning C++23 – the ultimate guide to mastering the latest in modern C++ programming!
View on Amazon

The partner thread is started the first time the user sends a message.

About The Author

M. Saqib

Saqib is Master-level Senior Software Engineer with over 14 years of experience in designing and developing large-scale software and web applications. He has more than eight years experience of leading software development teams. Saqib provides consultancy to develop software systems and web services for Fortune 500 companies. He has hands-on experience in C/C++ Java, JavaScript, PHP and .NET Technologies. Saqib owns and write contents on mycplus.com since 2004.