You are on page 1of 11

Project Report

on

“Project On Student Management”

Diploma Engineering (3rd Year)

(Branch –CO)

Smt. Sharchchandrika Suresh Patil Institute of Technology Polytecnic,


Chopda

Sumitted to: Sumitted by:

Madhuri Varule mam Yash Patil

Roll no:CO329
ACKNOWLEDGEMENT

This Project report was completed as a result of support from


many people, although not all of them can be mentioned.

We wish to express our sincere gratitude to our Principal Mr.


V N Borse sir for his protection, providence, guidance.

We are greatly indebted to our good subject teacher


Mrs.Madhuri Varule mam for his useful and necessary
observation, suggestions, contribution and corrections. We
would not have been able to achieve anything in this research
without your supervision. May God enrich you greatly in
every area of life.
Introduction

JAVA was developed by James Gosling at Sun Microsystems Inc in the year 1995,
later acquired by Oracle Corporation. It is a simple programming language. Java
makes writing, compiling, and debugging programming easy. It helps to create
reusable code and modular programs. Java is a classbased, object-oriented
programming language and is designed to have as few implementation
dependencies as possible. A general-purpose programming language made for
developers to write once run anywhere that is compiled Java code can run on all
platforms that support Java. Java applications are compiled to byte code that can
run on any Java Virtual Machine. The syntax of Java is similar to c/c++.
Swing has about four times the number of User Interface [UI] components as AWT
and is part of the standard Java distribution. By today’s application GUI
requirements, AWT is a limited implementation, not quite capable of providing the
components required for developing complex GUI’s required in modern
commercial applications. The AWT component set has quite a few bugs and really
does take up a lot of system resources when compared to equivalent Swing
resources.
Breif Description:-

Swing components are the basic building blocks of an application. We know that
Swing is a GUI widget toolkit for Java. Every application has some basic
interactive interface for the user. For example, a button, check-box, radio-button,
text-field, etc. These together form the components in Swing.

Let’s introduce them

JButton

JButton class is used to create a push-button on the UI. The button can contain
some display text or image. It generates an event when clicked and double-clicked.
A JButton can be implemented in the application by calling one of its constructors.
JLabel

JLabel class is used to render a read-only text label or images on the UI. It does not
generate any event.

JTextField

JTextField renders an editable single-line text box. A user can input non-formatted
text in the box. To initialize the text field, call its constructor and pass an optional
integer parameter to it. This parameter sets the width of the box measured by the
number of columns. It does not limit the number of characters that can be input in
the box.

JTextArea

JTextArea class renders a multi-line text box. Similar to the JTextField, a user can
input non-formatted text in the field. The constructor for JTextArea also expects
two integer parameters which define the height and width of the text-area in
columns. It does not restrict the number of characters that the user can input in the
text-area.

JCheckBox

JCheckBox renders a check-box with a label. The check-box has two states –
on/off. When selected, the state is on and a small tick is displayed in the box.
It returns a checkbox with the label Show Help. Notice the second parameter in the
constructor. It is a boolean value that indicates the default state of the check-box.
True means the check-box is defaulted to on state.

JRadioButton

JRadioButton is used to render a group of radio buttons in the UI. A user can select
one choice from the group.It creates a button group and three radio button
elements. All three elements are then added to the group. This ensures that only
one option out of the available options in the group can be selected at a time. The
default selected option is set to Easy.
Now that you have got the gist of components in Swing, it is highly recommended
to dive deeper and explore more. Swing components are fun to play around with
and can help create some real cool applications. So, get your hands-on on these
components by including them in your Swing application.

What Is ODBC/JDBC?

ODBC is an SQL-based Application Programming


Interface (API) created by Microsoft that is used by
Windows software applications to access databases via
SQL. JDBC is an SQL-based API created by Sun Microsystems to enable Java
applications to use SQL for database access.
These APIs provide communications between an application residing on a client
machine and a data source residing on the same client machine or on another server
computer.
Micro Focus XDBC includes both ODBC and JDBC drivers for COBOL data files.
Micro Focus XDBC gives ODBC-enabled Windows applications (like those in
Microsoft Office) and Java applications access to indexed, relative, and fixed-
length sequential data files.

My Code:

import javax.swing.*; import


java.awt.event.*; import
java.awt.*;
public class FrmStudent extends JFrame //implements ActionListener {

JLabel
lblStudentID,lblStudentName,lblContact,lblGender,lblCity,lblEmail,lblE
nrollment,lblBranchID;

JTextField
txtStudentID,txtBranchID,txtStudentName,txtContact,txtCity,txtEmail,t
xtEnrollment;

JRadioButton rbMale,rbFemale;

ButtonGroup z;

JComboBox cmbStudentName;

JButton btNew,btSave,btView,btDelete,btUpdate,btEdit;

Panel pnlTitle,pnlInterface,pnlButton,pnlCombo;
FrmStudent(){ setSize(600,600);
setLayout(null); int
x=10,y=10,w=100,h=30,g=10,x1=120;
y=y+h+g;

lblStudentID=new JLabel("Student ID");


txtStudentID=new JTextField();
lblStudentID.setBounds(x,y,w,h);
txtStudentID.setBounds(x1,y,w,h);

y=y+h+g;

lblStudentName=new JLabel("Student Name");


txtStudentName=new JTextField();
lblStudentName.setBounds(x,y,w,h);
txtStudentName.setBounds(x1,y,w,h);

y=y+h+g;

lblContact=new JLabel("Student Contact");


txtContact=new JTextField();
lblContact.setBounds(x,y,w,h);
txtContact.setBounds(x1,y,w,h);

y=y+h+g;

lblGender=new JLabel("Gender");
z=new ButtonGroup(); rbMale=new
JRadioButton("Male"); rbFemale=new
JRadioButton("Female");

z.add(rbMale);

z.add(rbFemale);
lblGender.setBounds(x,y,w,h);
rbMale.setBounds(x+110,y,70,h);
rbFemale.setBounds(x+190,y,70,h);

y=y+h+g;

lblCity=new JLabel("City");
txtCity=new JTextField();
lblCity.setBounds(x,y,w,h);
txtCity.setBounds(x1,y,w,h);

y=y+h+g;

lblEmail=new JLabel("Email");
txtEmail=new JTextField();
lblEmail.setBounds(x,y,w,h);
txtEmail.setBounds(x1,y,w,h);

y=y+h+g;
lblEnrollment=new JLabel("Enrollment No.");
txtEnrollment=new JTextField();
lblEnrollment.setBounds(x,y,w,h);
txtEnrollment.setBounds(x1,y,w,h);

y=y+h+g;

lblBranchID=new JLabel("Branch ID");


txtBranchID=new JTextField();
lblBranchID.setBounds(x,y,w,h);
txtBranchID.setBounds(x1,y,w,h);
y=y+h+g;

btNew=new JButton("New");
btNew.setBounds(x,y,100,h); btSave=new
JButton("Save"); btSave.setBounds(x+100,y,100,h);
btView=new JButton("View");
btView.setBounds(x+200,y,100,h);

y=y+h+g;

btDelete=new JButton("Delete");
btDelete.setBounds(x,y,100,h); btUpdate=new
JButton("Update");
btUpdate.setBounds(x+100,y,100,h); btEdit=new
JButton("Edit"); btEdit.setBounds(x+200,y,100,h);

y=y+h+g;
y=y+h+g;

cmbStudentName=new JComboBox();
cmbStudentName.setBounds(x,y,w,h);

add(lblStudentID);
add(lblStudentName);
add(lblContact); add(lblGender);
add(lblCity);
add(lblEmail);
add(lblEnrollment);
add(lblBranchID);
add(txtStudentID);
add(txtBranchID);
add(txtStudentName);
add(txtContact); add(txtCity);
add(txtEmail);
add(txtEnrollment);
add(cmbStudentName);
add(btNew); add(btSave);
add(btView);
add(btDelete); add(btUpdate);
add(btEdit);
add(rbMale); add(rbFemale);

show();

public static void main(String[] args){

new FrmStudent();

}
Output:-

You might also like