Server Client Chat Application

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Server Client chat application

using Java Socket Programming

1. Introduction
Communication is the most natural way of expressing ourselves as humans. Chatting is a method
of using technology to bring people and ideas together dispite of the geographical barriers. Our
project is an example of a simple chat application using Java Socket programming which connect
Server and Client.

2. Demo
3. Detail
3.1. Server

This is our Server interface. We can write message in the message text, then click Send button or
press Enter. You message then will apper in message area.

We user method scaleImage() to set scale for image icon. That mean no matter what the size of
image, it will fit with our icon lable.
actionPerformed is action we difine for Send button. When you write down the message, it will
be saved in dout. The by using setText(), the message will be shown in message area.

Here is the way to send message by pressing Enter instead of clicking on Send button.

We use port 1203 to connect Server to Client.


3.2 Client

Similar to Server, this is Client interface. We can write message in the message text, then click
Send button or press Enter. You message then will apper in message area.

We user method scaleImage() to set scale for image icon. That mean no matter what the size of
image, it will fit with our icon lable.
actionPerformed is action we difine for Send button. When you write down the message, it will
be saved in dout. The by using setText(), the message will be shown in message area.

Here is the way to send message by pressing Enter instead of clicking on Send button.

We use id 127.0.0.1 and port 1203 to connect Client to Server.

You might also like