Professional Documents
Culture Documents
ENGINEERING
TEAM DETAILS:
18MIS0152 KISHORE.B
18MIS0392 SIVAKUMAR.M
18MIS0137 SAM EUJIN.J
The start page of the application where the user will be given access to
register and login into the chat application and use it when they are in the organisation.
2. Register page
The user will be given rights to register into the application using their
employee id once the owner have added them into the company employee database.
3. Login page
The user and the owner can be logged in using the credentials that they have
given during the time of registration.
4. Employee page
This page is only accessed by the owner or the manger of the company where
he can add new employee details into the database so that the employee can register and
chat using this application.
5. Chat page
The logged in user can select the employee to whom he want to have a chat
and proceed to the chat section.
6. Chat section
The page for the chat where the user can have interactive session with the
other employee with the use of localhost used in the company/organisation.
Welcome page:
this.dispose();
new RegisterPage().setVisible(true);
this.dispose();
new LoginPage().setVisible(true);
this.dispose();
System.exit(0);
Register page:
try
Connection con =
DriverManager.getConnection("jdbc:derby://localhost:1527/OfflineMessangingSystem","ro
ot","root");
String s1 = T1.getText();
String s2 = T2.getText();
String s3 = T3.getText();
ResultSet rs = sta.executeQuery(sql1);
if(s1.equals(rs.getString(1).trim()))
flag = true;
if(flag)
if(s3.equals(s2))
int n = sta.executeUpdate(sql);
L5.setText("Successfully registered..");
else
else
catch(SQLException e)
{
L5.setText("Creation error");
this.dispose();
new WelcomePage().setVisible(true);
Login page:
String s1 = T1.getText();
String s2 = T2.getText();
try
this.dispose();
new EmployeePage().setVisible(true);
else
Connection con =
DriverManager.getConnection("jdbc:derby://localhost:1527/OfflineMessangingSystem","ro
ot","root");
ResultSet rs = sta.executeQuery(sql1);
while(rs.next())
flag = true;
catch(SQLException e)
{
L4.setText("Database error");
if(flag)
this.dispose();
new ChatPage(s1).setVisible(true);
else
L4.setText("invalid");
this.dispose();
new WelcomePage().setVisible(true);
}
Employee page:
try
Connection con =
DriverManager.getConnection("jdbc:derby://localhost:1527/OfflineMessangingSystem","ro
ot","root");
String s1 = T1.getText();
String s2 = T2.getText();
int n = sta.executeUpdate(sql);
L5.setText("added");
else
L5.setText("Wrong details!!");
catch(SQLException e)
L5.setText("Creation error");
}
}
this.dispose();
new WelcomePage().setVisible(true);
Chat page:
String s1 = T1.getText();
try
{
Connection con =
DriverManager.getConnection("jdbc:derby://localhost:1527/OfflineMessangingSystem","ro
ot","root");
ResultSet rs = sta.executeQuery(sql1);
while(rs.next())
if(s1.equals(UserName))
else
if(s1.equals(rs.getString(1).trim()))
flag = true;
catch(SQLException e)
}
if(flag)
this.dispose();
new ChatSection().setVisible(true);
else
L3.setText("Invalid");
Cbat Section:
try
ss = new ServerSocket(1201);
s = ss.accept();
while(!msgin.equals("exit"))
msgin = din.readUTF();
msg_area.setText(msg_area.getText().trim()+"\n"+msgin);
catch(Exception e)
try {
dout.writeUTF(msgout);
}
ye s i will inf0rm in 5 min
NetBea«s IDE B2
File Edrt Vieur Nau*gate Solve Refactor RW Debug Prgfl Ie Team Tools W ndow Hop
.-.ava & la x 10.Ouisuver.Java x @ O•*¥feotjava x D' .›a a x lgj SO i fr&s4ertir/ 16 . I x lgj sQt i t‹t•r!6eny:hr fs...1 K ”°
DtPt02