You are on page 1of 16

K L UNIVERSITY

FRESHMAN ENGINEERING DEPARTMENT


A Project Based Lab Report

On

GUI BASED JAVA PROGRAM WITH LOGIN PAGE

(ALONG WITH ID AND PASSWORD)


SUBMITTED BY:

NAME ID NO.
1. RAHUL SARKAR 2100032538
2. SANJAY KUMAR 2100032540
3. NANDA KISHORE JANA 2100032541
4. HARSHITA SINHA 2100032560
UNDER THE ESTEEMED GUIDANCE OF

S. PRADEEP RAJ

(ASSISTANT PROFESSOR)

KL UNIVERSITY
Green fields, Vaddeswaram – 522 502
Guntur Dt., AP, India.
DEPARTMENT OF BASIC ENGINEERING SCIENCES

CERTIFICATE

This is to certify that the project based laboratory report entitled “GUI BASED
JAVA PROGRAM WITH LOGIN PAGE (ALONG WITH ID AND PASSWORD) ” submitted
by our team members of Batch-18: Sanjay Kumar, Harshita Sinha, Rahul Sarkar,
Nanda Kishore Jana (2100032540, 2100032560, 2100032538, 2100032541) bearing
Regd. No. <REGD.NO> to the Department of Basic Engineering Sciences, KL
University in partial fulfillment of the requirements for the completion of a project in
“Computational Thinking for Object Oriented Programming - 21SC1203” course in I
B Tech II Semester, is a bonafide record of the work carried out by him/her under my
supervision during the academic year 2020-21.

PROJECT SUPERVISOR HEAD OF THE DEPARTMENT

S. PRADEEP RAJ Dr. D. HARITHA


ACKNOWLEDGEMENTS

It is great pleasure for me to express my gratitude to our honorable President


Sri. Koneru Satyanarayana, for giving the opportunity and platform with facilities
in accomplishing the project-based laboratory report.

I express the sincere gratitude to our director Dr. A Jagadeesh for his
administration towards our academic growth.

I express sincere gratitude to our Coordinator Dr. V. Krishna Reddy and


HOD-BES Dr. D. Haritha for her leadership and constant motivation provided in
successful completion of our academic semester. I record it as my privilege to deeply
thank for providing us the efficient faculty and facilities to make our ideas into reality.

I express my sincere thanks to our project supervisor S. Pradeep Raj for


his/her novel association of ideas, encouragement, appreciation, and intellectual zeal
which motivated us to venture this project successfully.

Finally, it is pleased to acknowledge the indebtedness to all those who devoted


themselves directly or indirectly to make this project report success.

NAME ID NO.
1. RAHUL SARKAR 2100032538
2. SANJAY KUMAR 2100032540
3. NANDA KISHORE JANA 2100032541
4. HARSHITA SINHA 2100032560
ABSTRACT

In this project we used to discuss about the implementation of GUI Interface


based java program which should have a login page and should take in ID and
password as login credentials. Then it should display all the notes that were
previously saved by the user. It should give him the option to delete previous
notes and also add new notes.

As, we are used to give the information about class of this GUI in which
we are using we have covered the basic programming constructs (such as
variables, data types, decision, loop, array and method) and introduced the
important concept of Object-Oriented Programming (OOP). As discussed, OOP
permits higher level of abstraction than traditional Procedural-Oriented
Languages (such as C). You can create high-level abstract data types
called classes to mimic real-life things also.

In this article, I shall show you how you can reuse the graphics classes provided
in JDK for constructing your own Graphical User Interface (GUI) applications.

So, after all the articles we have given the class diagram and also the output of
the program class.
INDEX

S.NO TITLE PAGE NO

1 Introduction 6

2 Aim of the Project 7

2.1 Advantages & Disadvantages 8

2.2 Future Implementation 8

3 Software & Hardware Details 9

4 Class Diagram 10

5 Implementation 11-14

6 Outputs/ScreenShots 15-17

7 Conclusion 18
INTRODUCTION

Graphical User Interfaces were introduced in reaction to the


perceived steep learning curve of Command-Line Interfaces (CLIs).
In this article, we will learn how to build a simple GUI using Java.

Java provides a rich set of libraries to create GUIs in a platform-


independent way. GUIs offer a visual display of components.
Components such as labels, text fields, buttons, checkbox, JP Panel,
JF Frame on the screen.

Java’s original GUI library was called Abstract Window Toolkit


(AWT). Later, it was replaced by Swing in Java SE 1.2. Since then,
Swing has remained the primary Java GUI technology.

As, in this project we will create the GUI interface in which we will
implement the program along with password and username. So, let
get started with our project.
AIM

TO CREATE A GUI INTERFACE BY USING LOGIN PAGE IN WHICH WE IMPLEMENT:

1) User ID

2) Password.

Advantages
1) It is a variable implementating function in the form of GUI interface
because it provides documentation.

2) It improves the learning skill and also help us to know how to make login
page in java in the form of GUI interface.

3) It is used to remove the redundancy in the data definition.

Disadvantages
1) It does not provide functional details.

2) It is not acceptable to many nontechnical users.


SYSTEM REQUIREMENTS

 SOFTWARE REQUIREMENTS:
The major software requirements of the project are as follows:
Language: JAVA
Operating system: Windows 10 or 11 also can access.
Tools: Eclipse IDE, Laptop, Mouse, etc.

 HARDWARE REQUIREMENTS:
The hardware requirements that map towards the software are as follows:

RAM: 8 GB.

Processor: i5/i7.
CLASS DIAGRAM
FUTURE IMPLEMENTATION

To develop in the future is:


1) Create User ID.
2) Create Password.
3) Implementation of Admin User.
CODE IMPLEMENTATION
package project;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

public class LoginDemo extends JFrame implements ActionListener {

JPanel panel;

JLabel user_label, password_label, message;

JTextField userName_text;

JPasswordField password_text;

JButton submit, cancel;

LoginDemo() {

// Username Label

user_label = new JLabel();

user_label.setText("User ID :");

userName_text = new JTextField();

// Password Label

password_label = new JLabel();

password_label.setText("Password :");

password_text = new JPasswordField();

// Submit

submit = new JButton("SUBMIT");

panel = new JPanel(new GridLayout(3, 1));


panel.add(user_label);

panel.add(userName_text);

panel.add(password_label);

panel.add(password_text);

message = new JLabel();

panel.add(message);

panel.add(submit);

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

// Adding the listeners to components.

submit.addActionListener(this);

add (panel, BorderLayout.CENTER);

setTitle("Please Login Here !");

setSize(450,350);

setVisible(true);

public static void main(String[] args) {

new LoginDemo();

@Override

public void actionPerformed(ActionEvent ae) {

String userName = userName_text.getText();

String password = password_text.getText();

if (userName.trim().equals("nanda kishore") &&


password.trim().equals("adminGRP")) {
message.setText(" Hello " + userName + "");

else if (userName.trim().equals("sanjay kumar") &&


password.trim().equals("2100032540")) {

message.setText(" Hello " + userName + "");

else if (userName.trim(). equals ("S.Pradeep sir") &&


password.trim().equals("faculty.java")) {

message.setText(" Good Morning " + userName + "");

else if (userName.trim().equals("Admin") &&


password.trim().equals("fed@cad")) {

message.setText(" Good Morning " + userName + "");

else {

message.setText(" Invalid user.. ");

}
OUTPUTS
Screenshot:
CONCLUSION & Future Work
We have successfully completed the project “GUI Interface to create the

login page and implement the password and user ID” in simply way and

given all test cases and everything is passed.

You might also like