Académique Documents
Professionnel Documents
Culture Documents
ON
“Browser”
Submitted to Uttaranchal University in partial fulfillment of the requirements for the degree of
ANSHUMAN
BCA 5 SEM
Page 1
TABLE OF CONTENTS
S.No. Title Page no.
1. ACKNOWLEDGEMENT 3
2. DECLARATION 4
3. CERTIFICATE OF ORIGINALITY 5
4. INTRODUCTION 6
5. OBJECTIVES 7
6. SYSTEM ANALYSIS 8
7. DATA FLOW DIAGRAM 10
8. TECHNOLOGIES USED 11
9. MINIMUM REQUIREMENTS 11
10. CODING 12
11. OUTPUTS 38
12. FUTURE SCOPE 40
13. CONCLUSION 40
14. BIBLIOGRAPHY 41
15.
16.
17.
ACKNOWLEDGEMENT
We express our sincere gratitude to “Miss lisa gopal” for his constant support and
Page 2
would not have been possible. We express our immense pleasure and thankfulness
to all the teachers of the Uttaranchal University for their cooperation and support.
Finally, we are thankful to our classmates for their cooperation and support that
ANSHUMAN
Page 3
DECLARATION
We hereby declare that the project report entitled “BROWSER” submitted
by Anshuman and Anshul to Uttaranchal institute of Management. The project
was done under the guidance of “Miss lisa gopal”. We further declare that the
work reported in this project has not been submitted and will not be
submitted, either in part or in full, for the award of any other degree or
diploma in this university or any other University or institute.
ANSHUL
ANSHUMAN
Page 4
CERTIFICATE OF ORIGINALITY
This is to certify that We are responsible for the work submitted in this paper, that
the original work is my own expect as specified in acknowledgements or in
footnotes, and that neither the paper nor the original work contained there has been
submitted to any journal or institution for publication.
Anshuman
Page 5
INTORDUCTION
The growth of the Internet has led to new and faster forms of communication.
There are now programs that allow users to communicate in real-time with one or
more people. These instant messaging tools are commonly referred to as browse
the internet. Some of these programs can be downloaded for free.
Browser is one the same way can be used to talk to your friend in your circle .All
you have to do is to provide his IP address and then you both will get connect to
each other and then you can talk.It is helpful because if you have any problem
while solving something you do not have to go to his room and to meet him and
you can talk to him on chat if you both are connected to each other and can get
solution of your problem .browser application is one of the most useful software
which is used to surf the internet.
Page 6
OBJECTIVE
Page 7
SYSTEM ANALYSIS
1.1 SERVER
1.2 CLIENT
SERVER :
The server program plays a passive role: it constantly checks its network
connection to see if there are any clients sending it requests for a service it can
provide. Once the server program detects a service request, it establishes the socket
and begins receiving and sending information to the client until the job is done.
Finally, the server closes the connection to the client and resumes the wait for more
client program requests for services.
CLIENT :
Once a connection is established, the client sends the server whatever data and
instructions are needed to complete the tasks it needs the server to perform. The
client application takes the data it receives from the server, displays it, saves it to a
storage device, prints it or forwards it to other clients on the network.
Page 8
Page 9
DATA FLOW DIAGRAM
0-LEVEL DFD:
1-LEVEL DFD:
Page
10
TECHNOLOGIES USED
Forms: JFRAME,
MINIMUM REQUIREMENTS
System Requirements:
Operating System: Microsoft® Windows® XP/Vista/window7/linux
Processor: 1 Ghz
Memory: 512 MB RAM
Hard Disk Space: 45 MB Available HDD Space
Video Card: 3D graphics accelerator equivalent to GF6200 or higher
Sound Card: 16-bit Sound Card
DirectX® Version: DirectX® 9.0c
Page
11
CODING
1.LOGIN Page
package logins;
import javax.swing.JOptionPane;
import java.awt.Toolkit;
import java.awt.event.WindowEvent;
import logins.login_s;
public login() {
initComponents();
@SuppressWarnings("unchecked")
Page
12
reset = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0,
0), 30));
jLabel1.setText("USERNAME");
jLabel2.setText("PASSWORD");
username.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0,
0)));
password.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0,
0)));
login.setText("LOGIN");
Page
13
login.addActionListener(new java.awt.event.ActionListener() {
loginActionPerformed(evt);
});
reset.setText("RESET");
reset.addActionListener(new java.awt.event.ActionListener() {
resetActionPerformed(evt);
});
cancel.setText("CANCEL");
cancel.addActionListener(new java.awt.event.ActionListener() {
cancelActionPerformed(evt);
});
Page
14
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(login)
.addComponent(reset)
.addComponent(cancel))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
Page
15
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(password)
.addComponent(username))))
.addContainerGap(82, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELIN
E)
.addComponent(jLabel1)
.addComponent(username, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELIN
E)
.addComponent(jLabel2)
.addComponent(password, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
Page
16
.addGap(49, 49, 49)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELIN
E)
.addComponent(login)
.addComponent(reset)
.addComponent(cancel))
.addContainerGap(80, Short.MAX_VALUE))
);
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(22, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
Page
17
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addContainerGap(34, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
);
pack();
}// </editor-fold>
password.setText(null);
String pass=password.getText();
Page
18
String user=username.getText();
password.setText(null);
username.setText(null);
systemExit();
Info.setVisible(true);
else
password.setText(null);
username.setText(null);
/**
*/
Page
19
public static void main(String args[]) {
try {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(login.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
java.util.logging.Logger.getLogger(login.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
java.util.logging.Logger.getLogger(login.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
Page
20
java.util.logging.Logger.getLogger(login.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
java.awt.EventQueue.invokeLater(new Runnable() {
new login().setVisible(true);
});
Page
21
}
USER Page
package logins;
import javax.swing.JOptionPane;
import java.awt.Toolkit;
import java.awt.event.WindowEvent;
import logins.Server;
import logins.Client;
public login_s() {
initComponents();
@SuppressWarnings("unchecked")
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
Page
22
jLabel1.setText("Select Server and Client");
jButton1.setText("SERVER");
jButton1.addActionListener(new java.awt.event.ActionListener() {
jButton1ActionPerformed(evt);
});
jButton2.setText("CLIENT");
jButton2.addActionListener(new java.awt.event.ActionListener() {
jButton2ActionPerformed(evt);
});
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jButton1)
Page
23
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton2))
.addContainerGap(44, Short.MAX_VALUE)))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton2))
.addContainerGap(71, Short.MAX_VALUE)))
);
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
Page
24
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(127, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(97, Short.MAX_VALUE))
);
pack();
}// </editor-fold>
systemExit();
Page
25
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
systemExit();
try {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
//</editor-fold>
Page
26
java.awt.EventQueue.invokeLater(new Runnable() {
new login_s().setVisible(true);
});
modify
CLIENT:
package logins;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.net.Socket;
Page
27
static Socket s;
public Client() {
initComponents();
@SuppressWarnings("unchecked")
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
msg_area.setColumns(20);
msg_area.setRows(5);
jScrollPane1.setViewportView(msg_area);
btnSend.setText("Send");
btnSend.addActionListener(new java.awt.event.ActionListener() {
btnSendActionPerformed(evt);
Page
28
});
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(btnSend, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addContainerGap()))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
Page
29
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(276, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(msg_text, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnSend))
.addContainerGap())
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addContainerGap(49, Short.MAX_VALUE)))
);
pack();
}// </editor-fold>
String msgout="";
try {
msgout=msg_text.getText().trim();
dos.writeUTF("Client: "+msgout);
Page
30
} catch (Exception e) {
try {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
java.util.logging.Logger.getLogger(Client.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
java.util.logging.Logger.getLogger(Client.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
java.util.logging.Logger.getLogger(Client.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
java.util.logging.Logger.getLogger(Client.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
Page
31
}
java.awt.EventQueue.invokeLater(new Runnable() {
new Client().setVisible(true);
});
String msgin="";
try {
dis=new DataInputStream(s.getInputStream());
dos=new DataOutputStream(s.getOutputStream());
while(!msgin.equals("exit")){
msgin=dis.readUTF();
msg_area.setText(msg_area.getText().trim()+"\n"+msgin);
} catch (Exception e) {
e.printStackTrace();
Page
32
private javax.swing.JScrollPane jScrollPane1;
SERVER:
package logins;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.net.ServerSocket;
import java.net.Socket;
import javax.swing.JFileChooser;
static Socket s;
public Server() {
initComponents();
@SuppressWarnings("unchecked")
Page
33
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
msg_area.setColumns(20);
msg_area.setRows(5);
jScrollPane1.setViewportView(msg_area);
msg_text.addActionListener(new java.awt.event.ActionListener() {
msg_textActionPerformed(evt);
});
btnSend.setText("Send");
btnSend.addActionListener(new java.awt.event.ActionListener() {
btnSendActionPerformed(evt);
});
Page
34
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1)
.addGroup(layout.createSequentialGroup()
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnSend))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pack();
Page
35
}// </editor-fold>
String msgout="";
try {
msgout=msg_text.getText().trim();
dos.writeUTF("Server: "+msgout);
} catch (Exception e) {
java.awt.EventQueue.invokeLater(new Runnable() {
new Server().setVisible(true);
});
try {
ss = new ServerSocket(1201);
s = ss.accept();
Page
36
dis = new DataInputStream(s.getInputStream());
while (!msgin.equals("exit")) {
msgin = dis.readUTF();
} catch (Exception e) {
e.printStackTrace();
Page
37
FUTURE SCOPE
Page
38
CONCLUSION
The browser is developed using java, jframe and fully meets the objectives of the
system for which it has been developed.
.
Page
39
Bibliography:
I have taken help from the following sources:
Books
Java Programming for Beginners BY Daniel Lorig
Thinking in JAVA
Web
WWW.CODEACADEMY.COM
WWW.TUTORIALSPOINT.COM
WWW.GEEKSFORGEEKS.ORG
Page
40