Ajp Report
Ajp Report
(22517)
Annexure-I
Micro-Project Proposal
II. Learn and used AWT and Swing components in University Management System.
IV. Check all the options and features and verify their workings.
1 59 Parth Patil
Annexure-II
Micro-Project Proposal
1.0 Rationale:
Java is divided into two parts i.e. Core Java (J2SE) and Advanced Java (JEE). The core Java part
covers the fundamentals (data types, functions, operators, loops, thread, exception handling, etc.)
of the Java programming language. It is used to develop general purpose applications. Whereas
Advanced Java covers the standard concepts such as database connectivity, networking, Servlet,
web-services, etc.
It is an advanced technology or advance version of Java specially designed to develop web- based,
network-centric or enterprise applications. It is a specialization in specific domain. Most of the
applications developed using advance Java uses tow-tier architecture i.e. Client and Server. All the
applications that run on Server can be considered as advance Java applications.
1. Window
2. Panel
3. Frame
4. Dialog
The window is the container that have no borders and menu bars. You must use frame, dialog
or another window for creating a window. We need to create an instance of Window class to
create this container.
2. Panel
The Panel is the container that doesn't contain title bar, border or menu bar. It is generic
container for holding the components. It can have other components like button, text field etc.
An instance of Panel class creates a container, in which we can add components.
3. Frame
The Frame is the container that contain title bar and border and can have menu bars. It can
have other components like button, text field, scrollbar etc. Frame is most widely used container
while developing an AWT application.
2. SWING:
1. JButton
We use JButton class to create a push button on the UI. The button can include some display
text or images. It yields an event when clicked and double-clicked. We can implement a JButton
in the application by calling one of its constructors.
We use JLabel class to render a read-only text label or images on the UI. It does not generate
any event.
The JTextField renders an editable single-line text box. Users can input non-formatted text in
the box. We can initialize the text field by calling its constructor and passing an optional integer
parameter. This parameter sets the box width measured by the number of columns. Also, it does
The JCheckBox renders a check-box with a label. The check-box has two states, i.e., on and
off. On selecting, the state is set to "on," and a small tick is displayed inside the box.
5. JTextArea
In Java, the Swing toolkit contains a JTextArea Class. It is under package javax.swing.
JTextArea class. It is used for displaying multiple-line text.
Declaration:
public class JTextArea extends JTextComponent
Declaration:
public class JPasswordField extends JTextField
Changing the state of an object is known as an event. For example, click on button, dragging
mouse etc. The java.awt.event package provides many event classes and Listener interfaces for
event handling.
ActionEvent ActionListener
MouseWheelEvent MouseWheelListener
KeyEvent KeyListener
ItemEvent ItemListener
TextEvent TextListener
AdjustmentEvent AdjustmentListener
WindowEvent WindowListener
ComponentEvent ComponentListener
ContainerEvent ContainerListener
FocusEvent FocusListener
For registering the component with the Listener, many classes provide the registration methods.
For example:
1. Button
2. MenuItem
4. TextArea
5. Checkbox
6. Choice
7. List
6.0 Input: -
package universitymanagement;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
Login () {
getContentPane().setBackground(Color.WHITE);
setLayout(null);
setSize(600, 300);
setLocation(500, 250);
setVisible(true);
}
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery(query);
if (rs.next()) {
setVisible(false);
new Project();
} else {
JOptionPane.showMessageDialog(null, "Invalid username or password");
setVisible(false);
}
} catch (Exception e) {
e.printStackTrace();
}
} else if (ae.getSource() == cancel) {
setVisible(false);
}
}
package universitymanagement;
import javax.swing.*;
import java.awt.*;
import java.util.*;
import com.toedter.calendar.JDateChooser;
import java.awt.event.*;
AddStudent() {
setSize(900, 700);
setLocation(350, 50);
setLayout(null);
setVisible(true);
}
try {
String query = "insert into student values('"+name+"', '"+fname+"', '"+rollno+"', '"+dob+"',
'"+address+"', '"+phone+"', '"+email+"', '"+x+"', '"+xii+"', '"+aadhar+"', '"+course+"', '"+branch+"')";
Connection:
package universitymanagement;
import java.sql.*;
Connection c;
Statement s;
Conn () {
try {
Class.forName("com.mysql.cj.jdbc.Driver");
c = DriverManager.getConnection("jdbc:mysql:///universitymanagement", "root",
"Sanika@2003");
s = c.createStatement();
Student Details:
package universitymanagement;
import javax.swing.*;
import java.awt.*;
import java.sql.*;
import net.proteanit.sql.DbUtils;
import java.awt.event.*;
Choice crollno;
JTable table;
JButton search, print, update, add, cancel;
StudentDetails() {
getContentPane().setBackground(Color.WHITE);
setLayout(null);
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery("select * from student");
while(rs.next()) {
crollno.add(rs.getString("rollno"));
}
} catch (Exception e) {
e.printStackTrace();
}
try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery("select * from student");
table.setModel(DbUtils.resultSetToTableModel(rs));
} catch (Exception e) {
e.printStackTrace();
}
setSize(900, 700);
setLocation(300, 100);
setVisible(true);
}
package universitymanagement;
import javax.swing.*;
Department of Computer Technology 2024-2025 22
Advance Java Programming University Management System
(22517)
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
UpdateStudent() {
setSize(900, 650);
setLocation(350, 50);
setLayout(null);
During the course of this micro-project, we learnt how to do Word Editor software. For Word
Editor we:
a) Develop programs using GUI framework (AWT and Swing).
10.0 Conclusion:
The University Management System provides a user-friendly solution for managing diverse university
operations. Its intuitive GUI simplifies tasks like student enrollment, fee management, result
publication, and faculty information management. This system significantly enhances efficiency and
reduces administrative burdens. The system's modular architecture promotes scalability and
maintainability, allowing for future expansion and customization. Additionally, the integration of Java
Applet technology enables web-based access, making it accessible to a broader user base, including
remote students and faculty.