SlideShare a Scribd company logo
1 of 112
Download to read offline
1
A Project Report Quiz
Management System
Session 2021-22
Submitted To
MR RAVI TIWARI
Submitted By:
ABHISHEK KUMAR GUPTA
201750040004
2
3
About The Organization
APT Technosoft was established by group of experienced and techno savvy
engineers in
2005 at Lucknow.
As on today the company has grown to become a Private limited company and
our performance in delivering quality product in various field of computer services
as
made us a leading organization and has obtain ISO 9001-2008 certification.
We have expanded our activities and operation to meet the requirement of our
clients. An office at Delhi has been started to cater requirement of Delhi based
clients.
Mission
Our mission is to develop most cost effective and latest technology. System based
solution for organization. Our solution has capability for extendibility and can be
upgraded as and when required. Our association with client is not limited to
execution of
order rather we wish to maintain a close relation to services as and when required.
Our Vision
We think them exist an efficient and economical solution to any business problem
and we
endeavor to provide the most economical solution to ensure your business growth.
4
Branch office in India
Development Office -
➢ D-1012/1, Indira Nagar, Lucknow (U.P.).
➢ 35 ,Punjabipura,Delhi Road, Brambhpuri Meerut (U.P. West).
Marketing Office : –
➢
50, Chanakya Puri , Indira Nagar , Lucknow(U.P.).
Email : info@aptTechnosoft.com
Phone : +91 -5223559053
5
Acknowledgment
I would like to express my deep and sincere gratitude to APT Technosoft (An
ISO 9001:2008) who gave me full support and encouraged me to work in their
company
for my summer training. I am deeply grateful to Mr. Sandeep Kumar Singh for his
help
and Support provided at every step of the project.
Last but not the least, I thank to all my colleagues for their support and co-
operation.
Team Members:
Abhishek Kumar Gupta
Utkarsh Pandey
6
Table Of Content
S.N Topic Name Page No.
1. Preface 7
2. About the language 8
3 Introduction 9
4 System overview 12
5 Justification of Platform 14
6 Database 20
7 Screenshot 22
8 Sample code 29
9 Testing 111
10 conclusion 112
7
PREFACE
Since Software development is difficult and complex process, which require a deep thinking, Clear
concept and efficient logic to solve problem arises during development. So only a few persons
really successes, for a good software developer must have clear concept for situation and great
commands on a language which is used to make proposed software. It also required long time
patient, better understanding and working capability in groups. About 15 years ago software
development is very tedious task, because few languages (C, Assembly) are available that is not so
powerful and easier in use, thus software formulation takes long time and consistency. Now these
days a lot of powerful language and technologies (Java, VB.Net, ASP.Net, JSP.Net) are came in
existence which has special feature and have built in controls in graphical shapes that help me to
Rapid Application Development. In these days software covers all economical area in India but
unfortunately it is not spread out as well as foreign countries. This is my first to convert our
Complex in digitized form that’s done manually that is time consuming and high-cost requirement
process. The proposed system development gradually by deep thinking, lot of discussion and
followed by some important rules that are used in software development. I am extremely thankful
to Mr. Sandeep Kumar Singh (Project Manager, APT Technosft) that has helped me in numerous
ways, without whose active co-operation this system could not have been completed.
8
About the language
What is Java ?
Java is a programming language and platform. Platform is
any hardware or software environment in which program runs, known as platform.
Since java has its own Runtime Environment (JRE) and its api called
platform.
Java was invented by James Gosling at Sun Microsystems Introduced in
1991.It took 18 months to develop first working version of Java. This Language was
initially called Oak( ) but was renamed Java in 1995. Initially Java was used for
building the software for the electronic devices like TV, VCRs and so on.
Java Compilation Process
Java is a language which uses both type of approach compile & Interpreter.
9
ByteCode :--
When we compile any java program with java compiler then compiler produce a
class file. The Class file contains java Bytecode. We can run java Bytecode with any
type of processor & O.S, without changes in source code. Same code can be run with
different-2 platform.
ByteCode instruction is not a machine instruction. This is not a type instruction
which can understand by Microprocessor directly. This is an Intermediate
Instruction. In Second Phase with the help of Interpreter we can change ByteCode
instruction into machine instruction.
Before getting deeply into the subject we will first know how Businesses are related
to Internet. As per the product documentation from a business perspective, there are
three phases of the Internet. The First phase gets back to the early 1990's when
Internet first came into general use and which brought a big revolution for
Businesses. In the First phase of the Internet Businesses designed and launched their
website’s and focused on the number of hits to know how many customers were
visiting their site and interested in their products, etc.
The Second phase is what we are in right now and in this phase, Businesses are
generating revenue through Online Transactions. We are now moving into the Third
phase of the Internet where profit is the main priority. The focus here is to
Businesses effectively communicated with their customers and partners who are
geographically isolated participate in Digital Economy and deliver a wide range of
services. How can that be possible? The answer, with Java.
10
Introduction
The project: “Quiz Application” is a collection of number of different types of
quizzes like technical, games, sports, etc. A user can access/play the entire quiz and
can attempt any of the one. There will be limited number of questions and for each
correct answer user will get a credit score. User can see answers as well as can ask a
query related to it. There are many quiz applications available currently on internet.
But there are few which provide better understanding between users and the appletes
application like, providing proper answers, user query Solving, uploading user
questions as well as answer to it, etc. To develop a user friendly quiz application.
which will contain : Numbers of quiz, Answers to every question, Query solving
regarding any question, Uploading of user question and answer, and to improve the
knowledge level of users. To develop an application which will contain solution to
the above problems. By this application the user will come to know about his/her
level and can learn additional knowledge. Also by this application a user can expand
his/her knowledge among the world.
11
Aim and Objective:
❖ Aim:
“Our aim is to develop an application for the users in which a user can attempt any number of
quizzes related to his/her choice.”
❖ Objective:
The main objective of “Quiz Application” is to facilitate a user friendly environment for all users
and reduces the manual effort. In past days quiz is conducted manually but in further resolution
of the technology we are able to generate the score and pose the queries automatically. The
functional requirements include creating users that are going to participate in the quiz, automatic
score and report generation and administrative tasks like add, delete, update for admin privilege
users. In this application, all the permissions lies with the administrator i.e., specifying the details
of the quiz with checking result will show to interviewee or not, addition of question and
answers, marks for each question, Set timer for each quiz and generate report with score for each
quiz.
Purpose, Scope and Applicability:
Purpose:
This web application provides facility to Play online quiz and practice Grammar, Aptitude, and
G.K., It provides a good platform, where a student not only judges there knowledge/skill but also
they can improve knowledge/skill at the same time.
Scope:
The Scope of this project is very broad in terms of gaining knowledge and sharing knowledge
among worlds.
Few points are: -
• Can be used anywhere and anytime as it is a web-based application.
• This application will be used in educational institutions as well as in the corporate world.
Applicability:
Anyone, whether a newcomer or professional, willing to learn they can choose it.
All users will have access to all subject containing subtopics
Users will receive the best experience without any interruptions.
12
Description:
Firstly, we have to make interfaces for Home Page, Login Page, Questions Attempting forum,
Result Page, & Profile of user. These all pages have connectivity with the server and database.
So, that it can work properly. Currently, there are websites which only provide limited number of
quizzes related to different domain. Many websites do not have a single platform for quizzes
related to technical, G.K, Aptitude, Games, etc. And there is not a website where the users can
upload his/her questions and answers for the others. We have to develop an application which
can resolve all of the above problems. By this user can gain knowledge, can solve his/her query,
and spread his/her knowledge among the world.
Methodology:
The programming language used for the development of the project is JAVA.
MySQL is used for Database.
Assumptions:
We assume that the users of our Application should have a minimal Knowledge of computer
system and should have an availability of internet. We are dependent on the sources from where
we have gathered the data and the data are authenticated.
13
Proposed System:
Unlike the other Application where you need to make account for every quiz you want to play,
but using this application, you just have to login by user name and password and then you will
get access to all quizzes from it.
The proposed system is an application will help in improving the knowledge and accuracy.
Requirement Analysis:
Hardware Requirement :
Most current Computers and Laptop have enough specifications to be used to create an
Application. The most important specification to check on the computer would be the size of the
RAM, which should be over 2 GB, more is better. This will ensure that the computer runs
quickly and smoothly, even with heavier programs. The computer should have a keyboard and
mouse attached and working as well.
S.NO NAME HARDWARE
1 Processor Intel dual core (32 bit)
2 RAM 4 GB
3 Processor Speed 2 GHz
Software Requirement:
Aside from a Computer and internet connection, most of the tools you need to build an
Application are Software Program. Some of which may already be on your computer
S.NO NAME SOFTWARE
1 Platform Windows 7,8,8.1,10,11
2 Language Used Net beans
3 Database tool MySQL
14
Justification of Platform:
Justification means why I choose this project to make because not just for making Project
for College It is for improving my skills.
❖Why Net beans :
Net beans is an open-source Integrated Development Environment (IDE) . It is used to
develop applications with JAVA, PHP, C++, HTML and many other Programming languages.
The applications are developed using modules in JAVA. Net beans can run on any operating
system such as windows, Macos, Linux etc.
Apache Net beans provides editors, wizards and templates to help you create applications in
JAVA, PHP and many other languages. The IDE simplifies the development of web, enterprise,
desktop and mobile applications that use .The JAVA and HTML5 platforms.
Advantages:
• Netbeans is very efficient in code development and java web development.
• Netbeans is a great tool to small as it is quite easy to use. its integration is great with other tools.
❖ Why MySQL:
MySQL is a relational database management system based on SQL- Structure Query Language.
The application is used for a wide range of purposes, including data warehousing, e-commerce and
logging applications. The most common use for MySQL is for the purpose of a web database.
MySQL creates a database for storing and manipulating data, defining the relationship of each
table. Clients can make request by typing specific SQL statements on MySQL.
Advantages:
• MySQL is more secure.
• MySQL is available for free to download and use from the official site of MySQL.
15
Requirements Specification
The systems primary focus should be on providing a user friendly easy to understand
interface, which can be used easily and simply by anyone.
Functional Requirements:
System Feature-
This section gives a functional requirement that applicable to the online Quiz.
There are two modules in this phase:
• Student/user module.
• Admin module.
Functionality of each module are:
Student/user module:
The student/user have to login in application. They can choose any of the given Quiz. Then
the student/user will get result immediately after the completion of test.
Admin module:
The admin can see all the tables in the Database and can add the
Question by selecting the particular topic.
Product Preliminary Description:
Product Perspective:
The Quiz Application is an educational platform built for those students and professionals who
have interest in Government exams and gaining knowledge. The admin of our application can
keep all the Quizzes updated all the time so that members get updated information. Here, various
Quizzes will be available with different topics and description. Users can provide their valuable
feedback and even contact us if there is any issue. The main users are : Admin (who can add,
update or remove any Quiz and information)and Members (who are here to study).
16
Waterfall Process model
The Classical Life Cycle or waterfall Process Model was the first process model to present a
sequential framework, describing basic stages that are mandatory for a successful software
development model. It formed the basis for most software development standards and consists of
the following phases: Requirement analysis, design, coding, testing, and maintenance.
Advantages of waterfall model:
• Simple goal.
• Simple to understand and use.
• Clearly defined stages.
• Easy to arrange tasks.
• Process and result are well documented.
• Customers / end users already know about it.
• Easy to manage.
Disadvantage of Waterfall model:
• Rigid design and inflexible procedure.
• Waterfall model faced “Inflexible point solution” which meant even small amendments
in the design were difficult to incorporate later design phase.
• As the requirement were froze before moving to the design phase, using the incomplete
set of requirement, a complete design was worked amendments In case of a large project,
completing a phase and then moving back to reconstruct the same phase, incurred a large
overhead.
• Once a phase is done, it is not repeated again that is movement in the waterfall goes one
to the next and the vice versa is not supported, deadlines are difficult to meet I case of
large projects.
17
18
ER Diagram
19
20
Database
A database is information that is set up for easy access, management and updating. Computer
databases typically store aggregations of data records or files that contain information, such as sales
transactions, customer data, financials and product information.
Quiz Table:
21
Student Table:
22
Screenshot
Main Page
User Registration
23
Set Instruction
Quiz Exam
24
Result
Admin Login
25
Admin Home Page
26
Add Question
27
Update Question
28
Delete
All Student
29
Simple Code
Main Page
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package quiz;
import java.awt.Toolkit;
import javax.swing.JOptionPane;
/**
*
* @author HP-PC
*/
public class Mpage extends javax.swing.JFrame {
/**
* Creates new form Mpage
*/
public Mpage() {
initComponents();
setIcon();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jButton1 = new javax.swing.JButton();
CmdAdmin = new javax.swing.JButton();
30
CmdExit = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
setTitle("QUIZ");
setFont(new java.awt.Font("Algerian", 0, 12)); // NOI18N
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jButton1.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/index student.png")));
// NOI18N
jButton1.setText("Student");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 0,
200, 70));
CmdAdmin.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N
CmdAdmin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/index
admin.png"))); // NOI18N
CmdAdmin.setText("Admin");
CmdAdmin.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CmdAdminActionPerformed(evt);
}
});
getContentPane().add(CmdAdmin, new org.netbeans.lib.awtextra.AbsoluteConstraints(910, 0,
180, 70));
CmdExit.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N
CmdExit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); //
NOI18N
CmdExit.setText("Exit");
CmdExit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CmdExitActionPerformed(evt);
}
});
getContentPane().add(CmdExit, new org.netbeans.lib.awtextra.AbsoluteConstraints(1090, 0,
180, 70));
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/index
background.png"))); // NOI18N
getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1290,
630));
31
pack();
setLocationRelativeTo(null);
}// </editor-fold>
private void CmdAdminActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
this.setVisible(false);
new LoginAdmin().setVisible(true);
}
private void CmdExitActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int a=JOptionPane.showConfirmDialog(this,"Do you really Exit
Application","Select",JOptionPane.YES_NO_OPTION);
if(a==0)
{
System.exit(0);
}
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
this.setVisible(false);
new StudentDetails().setVisible(true);
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Mpage.class.getName()).log(java.util.logging.Level.SEVERE,
32
null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Mpage.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Mpage.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Mpage.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
}
//</editor-fold>
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Mpage().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton CmdAdmin;
private javax.swing.JButton CmdExit;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
// End of variables declaration
private void setIcon() {
setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("abc.jpg")));
}
}
User Registration
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package quiz;
import java.sql.*;
33
import java.text.SimpleDateFormat;
import java.util.Date;
import Project.ConnectionProvider;
import java.awt.Color;
import java.awt.color.*;
import javax.swing.JOptionPane;
/**
*
* @author HP-PC
*/
public class StudentDetails extends javax.swing.JFrame {
/**
* Creates new form StudentDetails
*/
public StudentDetails() {
initComponents();
SimpleDateFormat dform=new SimpleDateFormat("dd-MM-yyyy");
Date date=new Date();
dlbl.setText(dform.format(date));
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
dlbl = new javax.swing.JLabel();
CmdBack = new javax.swing.JButton();
CmdClose = new javax.swing.JButton();
jSeparator1 = new javax.swing.JSeparator();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
34
jLabel12 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
jLabel14 = new javax.swing.JLabel();
jLabel15 = new javax.swing.JLabel();
rtf = new javax.swing.JTextField();
ntf = new javax.swing.JTextField();
ftf = new javax.swing.JTextField();
mtf = new javax.swing.JTextField();
gcmb = new javax.swing.JComboBox();
ctf = new javax.swing.JTextField();
etf = new javax.swing.JTextField();
hstf = new javax.swing.JTextField();
istf = new javax.swing.JTextField();
hptf = new javax.swing.JTextField();
iptf = new javax.swing.JTextField();
hytf = new javax.swing.JTextField();
iytf = new javax.swing.JTextField();
utf = new javax.swing.JTextField();
gptf = new javax.swing.JTextField();
gytf = new javax.swing.JTextField();
CmdSave = new javax.swing.JButton();
atf = new javax.swing.JTextField();
jScrollPane1 = new javax.swing.JScrollPane();
jTextArea1 = new javax.swing.JTextArea();
jLabel16 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setBackground(new java.awt.Color(255, 153, 0));
setUndecorated(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/index student.png")));
// NOI18N
getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1,
59));
jLabel2.setFont(new java.awt.Font("Algerian", 1, 48)); // NOI18N
jLabel2.setText("Fill up the form");
getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(67, 0, 445,
-1));
jLabel3.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel3.setText("Date:");
getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(606, 13, -1,
-1));
dlbl.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
35
dlbl.setText("jLabel4");
getContentPane().add(dlbl, new org.netbeans.lib.awtextra.AbsoluteConstraints(696, 13, -1, -
1));
CmdBack.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
CmdBack.setIcon(new javax.swing.ImageIcon(getClass().getResource("/back student.png")));
// NOI18N
CmdBack.setText("Back");
CmdBack.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CmdBackActionPerformed(evt);
}
});
getContentPane().add(CmdBack, new org.netbeans.lib.awtextra.AbsoluteConstraints(1050, 0,
-1, 70));
CmdClose.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
CmdClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); //
NOI18N
CmdClose.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CmdCloseActionPerformed(evt);
}
});
getContentPane().add(CmdClose, new org.netbeans.lib.awtextra.AbsoluteConstraints(1200, 0,
-1, 70));
getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 70,
1370, 10));
jLabel5.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel5.setText("Roll no");
getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 80,
100, 20));
jLabel6.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel6.setText("Name");
getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 120, -1,
-1));
jLabel7.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel7.setText("Father Name");
getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 149, -1,
-1));
jLabel8.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel8.setText("Mother Name");
getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 193, -1,
-1));
36
jLabel9.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel9.setText("Contact Number");
getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 274, -1,
-1));
jLabel10.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel10.setText("Email");
getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 318, -
1, -1));
jLabel11.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel11.setText("Gender");
getContentPane().add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 237, -
1, -1));
jLabel12.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel12.setText("10th");
getContentPane().add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 364, -
1, -1));
jLabel13.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel13.setText("12th");
getContentPane().add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 408, -
1, -1));
jLabel14.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel14.setText("Graduation");
getContentPane().add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 452, -
1, -1));
jLabel15.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel15.setText("Address");
getContentPane().add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 496, -
1, -1));
rtf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
rtf.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rtfActionPerformed(evt);
}
});
getContentPane().add(rtf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 80, 200, -
1));
ntf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
getContentPane().add(ntf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 120, 510, -
1));
37
ftf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
getContentPane().add(ftf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 160, 510, -
1));
mtf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
getContentPane().add(mtf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 200, 510,
-1));
gcmb.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
gcmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Male", "Female",
"Others" }));
getContentPane().add(gcmb, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 240,
510, -1));
ctf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
getContentPane().add(ctf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 280, 510, -
1));
etf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
getContentPane().add(etf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 320, 510, -
1));
hstf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
hstf.setForeground(new java.awt.Color(204, 204, 204));
hstf.setText("Enter Your University Name");
hstf.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
hstfFocusGained(evt);
}
});
getContentPane().add(hstf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 360, 300,
-1));
istf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
istf.setForeground(new java.awt.Color(204, 204, 204));
istf.setText("Enter Your University Name");
istf.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
istfFocusGained(evt);
}
});
getContentPane().add(istf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 400, 300, -
1));
hptf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
hptf.setForeground(new java.awt.Color(204, 204, 204));
hptf.setText("Percentage");
38
hptf.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
hptfFocusGained(evt);
}
});
getContentPane().add(hptf, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 360, 130,
-1));
iptf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
iptf.setForeground(new java.awt.Color(204, 204, 204));
iptf.setText("Percentage");
iptf.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
iptfFocusGained(evt);
}
});
getContentPane().add(iptf, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 400, 130,
-1));
hytf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
hytf.setForeground(new java.awt.Color(204, 204, 204));
hytf.setText("Year Passout");
hytf.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
hytfFocusGained(evt);
}
});
getContentPane().add(hytf, new org.netbeans.lib.awtextra.AbsoluteConstraints(720, 360, 150,
-1));
iytf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
iytf.setForeground(new java.awt.Color(204, 204, 204));
iytf.setText("Year Passout");
iytf.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
iytfFocusGained(evt);
}
});
getContentPane().add(iytf, new org.netbeans.lib.awtextra.AbsoluteConstraints(720, 400, 150,
-1));
utf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
utf.setForeground(new java.awt.Color(204, 204, 204));
utf.setText("Enter Your University Name");
utf.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
utfFocusGained(evt);
}
39
});
getContentPane().add(utf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 440, 300, -
1));
gptf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
gptf.setForeground(new java.awt.Color(204, 204, 204));
gptf.setText("Percentage");
gptf.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
gptfFocusGained(evt);
}
});
getContentPane().add(gptf, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 440, 130,
-1));
gytf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
gytf.setForeground(new java.awt.Color(204, 204, 204));
gytf.setText("Year Passout");
gytf.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
gytfFocusGained(evt);
}
});
getContentPane().add(gytf, new org.netbeans.lib.awtextra.AbsoluteConstraints(720, 440, 150,
-1));
CmdSave.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
CmdSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/save.png"))); //
NOI18N
CmdSave.setText("Save & Next");
CmdSave.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CmdSaveActionPerformed(evt);
}
});
getContentPane().add(CmdSave, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 560,
250, 50));
atf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
getContentPane().add(atf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 500, 850, -
1));
jTextArea1.setEditable(false);
jTextArea1.setColumns(20);
jTextArea1.setFont(new java.awt.Font("Arial", 0, 18)); // NOI18N
jTextArea1.setRows(5);
jTextArea1.setText("Before the examination day at digital examinationsnPlease make sure
that:n• you have an active user account at UiB. Log on to webmail.uib.no, miside.uib.no or
40
another UiB-service to see if your account is active.n• you remember the password for your UiB-
account. If you have forgotten your password, you can change it at sebra.uib.no.n• If you are
using your personal laptop, please make sure that you have installed the necessary software and
programs before the examination day. It is important that your laptop fulfils the system
requirements of the programme.n• You must bring your own power supply for use during the
examination.n• If failure to comply with these recommendations results in technical problems
that cause a delay in your examination, you cannot expect to be granted extended time.n");
jScrollPane1.setViewportView(jTextArea1);
getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(880,
70, 410, 400));
jLabel16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pages background
student.jpg"))); // NOI18N
getContentPane().add(jLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0,
1310, 700));
jPanel2.setBackground(new java.awt.Color(255, 204, 0));
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 60, Short.MAX_VALUE)
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 700, Short.MAX_VALUE)
);
getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1300, 0,
60, 700));
pack();
setLocationRelativeTo(null);
}// </editor-fold>
private void CmdBackActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
this.setVisible(false);
new Mpage().setVisible(true);
}
private void CmdCloseActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int a=JOptionPane.showConfirmDialog(this,"Do you really Exit
Application","Select",JOptionPane.YES_NO_OPTION);
if(a==0)
41
{
System.exit(0);
}
}
private void hstfFocusGained(java.awt.event.FocusEvent evt) {
// TODO add your handling code here:
if(hstf.getText().equals("Enter Your University Name"))
{
hstf.setText("");
hstf.setForeground(new Color(0,0,0));
}
}
private void istfFocusGained(java.awt.event.FocusEvent evt) {
// TODO add your handling code here:
if(istf.getText().equals("Enter Your University Name"))
{
istf.setText("");
istf.setForeground(new Color(0,0,0));
}
}
private void utfFocusGained(java.awt.event.FocusEvent evt) {
// TODO add your handling code here:
if(utf.getText().equals("Enter Your University Name"))
{
utf.setText("");
utf.setForeground(new Color(0,0,0));
}
}
private void hptfFocusGained(java.awt.event.FocusEvent evt) {
// TODO add your handling code here:
if(hptf.getText().equals("Percentage"))
{
hptf.setText("");
hptf.setForeground(new Color(0,0,0));
}
}
private void iptfFocusGained(java.awt.event.FocusEvent evt) {
// TODO add your handling code here:
if(iptf.getText().equals("Percentage"))
{
iptf.setText("");
iptf.setForeground(new Color(0,0,0));
42
}
}
private void gptfFocusGained(java.awt.event.FocusEvent evt) {
// TODO add your handling code here:
if(gptf.getText().equals("Percentage"))
{
gptf.setText("");
gptf.setForeground(new Color(0,0,0));
}
}
private void hytfFocusGained(java.awt.event.FocusEvent evt) {
// TODO add your handling code here:
if(hytf.getText().equals("Year Passout"))
{
hytf.setText("");
hytf.setForeground(new Color(0,0,0));
}
}
private void iytfFocusGained(java.awt.event.FocusEvent evt) {
// TODO add your handling code here:
if(iytf.getText().equals("Year Passout"))
{
iytf.setText("");
iytf.setForeground(new Color(0,0,0));
}
}
private void gytfFocusGained(java.awt.event.FocusEvent evt) {
// TODO add your handling code here:
if(gytf.getText().equals("Year Passout"))
{
gytf.setText("");
gytf.setForeground(new Color(0,0,0));
}
}
private void CmdSaveActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String rollno=rtf.getText();
String name=ntf.getText();
String fathername=ftf.getText();
String mothername=mtf.getText();
String gender=(String)gcmb.getSelectedItem();
String contactno=ctf.getText();
String email=etf.getText();
43
String tun=hstf.getText();
String tp=hptf.getText();
String ty=hytf.getText();
String twun=istf.getText();
String twp=iptf.getText();
String twy=iytf.getText();
String gun=utf.getText();
String gp=gptf.getText();
String gy=gytf.getText();
String address=atf.getText();
String mark="";
try{
Connection con=ConnectionProvider.getCon();
PreparedStatement p=con.prepareStatement("insert into student
values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
p.setString(1,rollno);
p.setString(2,name);
p.setString(3,fathername);
p.setString(4,mothername);
p.setString(5,gender);
p.setString(6,contactno);
p.setString(7,email);
p.setString(8,tun);
p.setString(9,tp);
p.setString(10,ty);
p.setString(11,twun);
p.setString(12, twp);
p.setString(13,twy);
p.setString(14,gun);
p.setString(15,gp);
p.setString(16,gy);
p.setString(17,address);
p.setString(18,mark);
p.executeUpdate();
setVisible(false);
new SetInstruction(rollno).setVisible(true);
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this, ex);
}
}
private void rtfActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
44
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(StudentDetails.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(StudentDetails.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(StudentDetails.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(StudentDetails.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new StudentDetails().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton CmdBack;
private javax.swing.JButton CmdClose;
45
private javax.swing.JButton CmdSave;
private javax.swing.JTextField atf;
private javax.swing.JTextField ctf;
private javax.swing.JLabel dlbl;
private javax.swing.JTextField etf;
private javax.swing.JTextField ftf;
private javax.swing.JComboBox gcmb;
private javax.swing.JTextField gptf;
private javax.swing.JTextField gytf;
private javax.swing.JTextField hptf;
private javax.swing.JTextField hstf;
private javax.swing.JTextField hytf;
private javax.swing.JTextField iptf;
private javax.swing.JTextField istf;
private javax.swing.JTextField iytf;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel15;
private javax.swing.JLabel jLabel16;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel2;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JTextArea jTextArea1;
private javax.swing.JTextField mtf;
private javax.swing.JTextField ntf;
private javax.swing.JTextField rtf;
private javax.swing.JTextField utf;
// End of variables declaration
}
Set Instruction
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
46
package quiz;
import javax.swing.JOptionPane;
/**
*
* @author HP-PC
*/
public class SetInstruction extends javax.swing.JFrame {
public String rollno;
/**
* Creates new form SetInstruction
*/
public SetInstruction() {
initComponents();
}
public SetInstruction(String rollno1) {
//To change body of generated methods, choose Tools | Templates.
initComponents();
JOptionPane.showMessageDialog(this, rollno1);
rollno=rollno1;
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jSeparator1 = new javax.swing.JSeparator();
jScrollPane1 = new javax.swing.JScrollPane();
jTextArea1 = new javax.swing.JTextArea();
CmdStart = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel1.setFont(new java.awt.Font("Algerian", 1, 48)); // NOI18N
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/index student.png")));
// NOI18N
jLabel1.setText(" Instruction");
47
getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 499,
88));
getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 90,
1048, 10));
jTextArea1.setEditable(false);
jTextArea1.setColumns(20);
jTextArea1.setFont(new java.awt.Font("Arial", 1, 24)); // NOI18N
jTextArea1.setRows(5);
jTextArea1.setText(" Before the examination startsn Arrive at the examination venue at least
15 minutes before the start of the examination / 35 minutes before a digital examination.nLaw:
The examination starts at the moment the book control begins, and you must therefore be present
by 8.20 a.m. for regular written examinations and 8.10 a.m. at digital examinations.nWhen using a
laptop at digital examinations, the laptop has to be set up as soon as possible. If you are taking a
law exam, the laptop must be set up before the book control.nCoats, backpacks, bags, etc. must be
placed as directed. Mobile phones, mp3 players, smartwatches and other electronic devices must be
turned off and put away, and cannot be stored in coats or pockets.nIf support material, other than
that which is specifically permitted, is found at or by the desk, it may be treated as an attempt to
cheat and relevant procedures for cheating will be followed.");
jScrollPane1.setViewportView(jTextArea1);
getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10,
119, 1021, 406));
CmdStart.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
CmdStart.setText("Start Quiz /Exam");
CmdStart.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CmdStartActionPerformed(evt);
}
});
getContentPane().add(CmdStart, new org.netbeans.lib.awtextra.AbsoluteConstraints(306, 557,
397, 59));
jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pages background
student.jpg"))); // NOI18N
getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1050,
630));
pack();
setLocationRelativeTo(null);
}// </editor-fold>
private void CmdStartActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
this.setVisible(false);
new QuizExam(rollno).setVisible(true);
}
48
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(SetInstruction.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(SetInstruction.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(SetInstruction.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(SetInstruction.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new SetInstruction().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton CmdStart;
private javax.swing.JLabel jLabel1;
49
private javax.swing.JLabel jLabel2;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JTextArea jTextArea1;
// End of variables declaration
}
Quiz Exam
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package quiz;
import Project.ConnectionProvider;
import java.sql.*;
import java .awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.SimpleDateFormat;
import java .util.Date;
import javax.swing.JOptionPane;
import javax.swing.Timer;
/**
*
* @author HP-PC
*/
public class QuizExam extends javax.swing.JFrame {
public String QuestionId="1";
public String answer;
public int min=00;
public int sec=00;
public int marks=0;
public void answerCheck(){
String studentAnswer="";
if(rb1.isSelected())
{
studentAnswer=rb1.getText();
}
else if(rb2.isSelected())
{
studentAnswer=rb2.getText();
}
else if(rb3.isSelected())
{
50
studentAnswer=rb3.getText();
}
else
{
studentAnswer=rb4.getText();
}
if(studentAnswer.equals(answer))
{
marks=marks+1;
String marks1=String.valueOf(marks);
//int m=marks;
mk.setText(marks1);
}
else
{
}
int questionid1=Integer.parseInt(QuestionId);
questionid1=questionid1+1;
QuestionId=String.valueOf(questionid1);
rb1.setSelected(false);
rb2.setSelected(false);
rb3.setSelected(false);
rb4.setSelected(false);
}
public void question(){
try{
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
ResultSet rs1=st.executeQuery("select * from question where id='"+QuestionId+"'");
while(rs1.next())
{
qn.setText(rs1.getString(1));
qd.setText(rs1.getString(2));
rb1.setText(rs1.getString(3));
rb2.setText(rs1.getString(4));
rb3.setText(rs1.getString(5));
rb4.setText(rs1.getString(6));
answer=rs1.getString(7);
}
}
51
catch(Exception ex)
{
JOptionPane.showMessageDialog(this,ex);
}
int j=Integer.parseInt(qn.getText());
if(j==10)
{
CmdNext.setVisible(false);
}
}
public void submit(){
answerCheck();
String rollno=rbl.getText();
try{
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
st.executeUpdate("update student set mark='"+marks+"'where rollno='"+rollno+"'");
String marks1=String.valueOf(marks);
setVisible(false);
new Submit(marks1).setVisible(true);
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this, ex);
}
}
/**
* Creates new form QuizExam
*/
public QuizExam(String rollno) {
initComponents();
SimpleDateFormat dform=new SimpleDateFormat("dd-MM-yyyy");
Date date=new Date();
dt.setText(dform.format(date));
rbl.setText(rollno);
try{
Connection con=ConnectionProvider.getCon();
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from student where rollno='"+rollno+"'");
while(rs.next())
{
nm.setText(rs.getString(2));
}
52
ResultSet rs1=st.executeQuery("select * from question where id='"+QuestionId+"'");
while(rs1.next())
{
qn.setText(rs1.getString(1));
qd.setText(rs1.getString(2));
rb1.setText(rs1.getString(3));
rb2.setText(rs1.getString(4));
rb3.setText(rs1.getString(5));
rb4.setText(rs1.getString(6));
answer=rs1.getString(7);
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this,ex);
}
setLocationRelativeTo(this);
time=new Timer(1000,new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
sc.setText(String.valueOf(sec));
mn.setText(String.valueOf(min));
if(sec==60)
{
sec=00;
min++;
if(min==10)
{
time.stop();
answerCheck();
submit();
}
}
sec++;
}
});
time.start();
}
Timer time;
public QuizExam() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
53
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
dt = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
mn = new javax.swing.JLabel();
sc = new javax.swing.JLabel();
jSeparator1 = new javax.swing.JSeparator();
sc1 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
jLabel14 = new javax.swing.JLabel();
rbl = new javax.swing.JLabel();
nm = new javax.swing.JLabel();
jLabel17 = new javax.swing.JLabel();
qn = new javax.swing.JLabel();
mk = new javax.swing.JLabel();
qd = new javax.swing.JLabel();
rb1 = new javax.swing.JRadioButton();
rb2 = new javax.swing.JRadioButton();
rb3 = new javax.swing.JRadioButton();
rb4 = new javax.swing.JRadioButton();
CmdNext = new javax.swing.JButton();
CmdSbt = new javax.swing.JButton();
jLabel21 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jPanel1.setBackground(new java.awt.Color(0, 255, 255));
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/index student.png")));
// NOI18N
jLabel2.setFont(new java.awt.Font("Algerian", 1, 50)); // NOI18N
54
jLabel2.setText("Welcome");
jLabel3.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel3.setText("Date");
dt.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
dt.setText("jLabel4");
jLabel5.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel5.setText("Total Time:");
jLabel6.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel6.setText("Time Taken");
jLabel7.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel7.setText("10");
mn.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
mn.setForeground(new java.awt.Color(255, 0, 51));
mn.setText("00");
sc.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
sc.setForeground(new java.awt.Color(255, 0, 51));
sc.setText("00");
sc1.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
sc1.setForeground(new java.awt.Color(255, 0, 51));
sc1.setText(":");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 71,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 317,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(161, 161, 161)
.addComponent(jLabel3)
.addGap(40, 40, 40)
.addComponent(dt)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 323,
Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
55
false)
.addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(46, 46, 46)
.addComponent(jLabel7))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(42, 42, 42)
.addComponent(mn)
.addGap(7, 7, 7)
.addComponent(sc1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(sc)))
.addGap(38, 38, 38))
.addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING)
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 77,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(10, 10, 10)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 76,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel3)
.addComponent(dt)
.addComponent(jLabel5)
.addComponent(jLabel7))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(mn)
.addComponent(sc)
.addComponent(sc1))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12,
Short.MAX_VALUE)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE))
);
56
getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1,
140));
jPanel2.setBackground(new java.awt.Color(51, 255, 255));
jLabel10.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel10.setText("Roll no");
jLabel11.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel11.setText("Name");
jLabel12.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel12.setText("Total Question");
jLabel13.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel13.setText("Question No");
jLabel14.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel14.setText("Marks");
rbl.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
rbl.setText("101");
nm.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
nm.setText("Abhishek");
jLabel17.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel17.setText("10");
qn.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
qn.setText("00");
mk.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
mk.setText("00");
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel10)
.addGap(60, 60, 60)
.addComponent(rbl, javax.swing.GroupLayout.PREFERRED_SIZE, 58,
javax.swing.GroupLayout.PREFERRED_SIZE))
57
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
false)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel14)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(mk))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel13)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(qn))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel12)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel17)))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel11)
.addGap(49, 49, 49)
.addComponent(nm, javax.swing.GroupLayout.PREFERRED_SIZE, 219,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(78, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel10)
.addComponent(rbl))
.addGap(51, 51, 51)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel11)
.addComponent(nm))
.addGap(39, 39, 39)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel12)
.addComponent(jLabel17))
.addGap(38, 38, 38)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel13)
.addComponent(qn))
58
.addGap(35, 35, 35)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel14)
.addComponent(mk))
.addContainerGap(318, Short.MAX_VALUE))
);
getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 138,
410, 630));
qd.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
qd.setText("Question Demo");
getContentPane().add(qd, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 230, 810, -
1));
rb1.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
rb1.setText("jRadioButton1");
rb1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rb1ActionPerformed(evt);
}
});
getContentPane().add(rb1, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 340, -1, -
1));
rb2.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
rb2.setText("jRadioButton2");
rb2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rb2ActionPerformed(evt);
}
});
getContentPane().add(rb2, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 420, -1, -
1));
rb3.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
rb3.setText("jRadioButton3");
rb3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rb3ActionPerformed(evt);
}
});
getContentPane().add(rb3, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 490, -1, -
1));
rb4.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
rb4.setText("jRadioButton4");
59
rb4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rb4ActionPerformed(evt);
}
});
getContentPane().add(rb4, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 560, -1, -
1));
CmdNext.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
CmdNext.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Next.png"))); //
NOI18N
CmdNext.setText("Next");
CmdNext.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CmdNextActionPerformed(evt);
}
});
getContentPane().add(CmdNext, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 650,
-1, -1));
CmdSbt.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
CmdSbt.setIcon(new javax.swing.ImageIcon(getClass().getResource("/save.png"))); //
NOI18N
CmdSbt.setText("Submit");
CmdSbt.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CmdSbtActionPerformed(evt);
}
});
getContentPane().add(CmdSbt, new org.netbeans.lib.awtextra.AbsoluteConstraints(1220, 660,
-1, -1));
jLabel21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pages background
student.jpg"))); // NOI18N
getContentPane().add(jLabel21, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0,
1370, -1));
pack();
}// </editor-fold>
private void CmdNextActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
answerCheck();
60
question();
}
private void CmdSbtActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int a=JOptionPane.showConfirmDialog(this,"Do you really want to
submit","select",JOptionPane.YES_NO_OPTION);
if(a==0)
{
answerCheck();
submit();
}
}
private void rb1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(rb1.isSelected())
{
rb2.setSelected(false);
rb3.setSelected(false);
rb4.setSelected(false);
}
}
private void rb2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(rb2.isSelected())
{
rb1.setSelected(false);
rb3.setSelected(false);
rb4.setSelected(false);
}
}
private void rb3ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(rb3.isSelected())
{
rb1.setSelected(false);
rb2.setSelected(false);
rb4.setSelected(false);
}
}
61
private void rb4ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(rb4.isSelected())
{
rb2.setSelected(false);
rb3.setSelected(false);
rb1.setSelected(false);
}
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(QuizExam.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(QuizExam.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(QuizExam.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(QuizExam.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
}
//</editor-fold>
62
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new QuizExam().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton CmdNext;
private javax.swing.JButton CmdSbt;
private javax.swing.JLabel dt;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel17;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel21;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JLabel mk;
private javax.swing.JLabel mn;
private javax.swing.JLabel nm;
private javax.swing.JLabel qd;
private javax.swing.JLabel qn;
private javax.swing.JRadioButton rb1;
private javax.swing.JRadioButton rb2;
private javax.swing.JRadioButton rb3;
private javax.swing.JRadioButton rb4;
private javax.swing.JLabel rbl;
private javax.swing.JLabel sc;
private javax.swing.JLabel sc1;
// End of variables declaration
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
63
package quiz;
/**
*
* @author HP-PC
*/
public class Submit extends javax.swing.JFrame {
/**
* Creates new form Submit
*/
public Submit() {
initComponents();
}
public Submit(String marks1) {
initComponents();
//int i=2;
String marks="Marks Obtained :"+marks1;
//int i=Integer.parseInt(marks);
//i=i-2;
rsl.setText(marks);
}
Submit(int marks1) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of
generated methods, choose Tools | Templates.
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
rsl = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
rsl1 = new javax.swing.JLabel();
rsl2 = new javax.swing.JLabel();
rsl3 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
64
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/quiz/Close.png"))); //
NOI18N
getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(1306, 0, -1,
-1));
jLabel2.setFont(new java.awt.Font("Verdana", 1, 60)); // NOI18N
jLabel2.setText("Sucessfully Updated");
getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(384, 374,
714, 120));
rsl.setFont(new java.awt.Font("Verdana", 1, 60)); // NOI18N
rsl.setText("Marks Obtained: ");
getContentPane().add(rsl, new org.netbeans.lib.awtextra.AbsoluteConstraints(383, 252, 720,
120));
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/quiz/Close.png"))); //
NOI18N
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(1163, 0,
70, 60));
rsl1.setFont(new java.awt.Font("Verdana", 1, 60)); // NOI18N
rsl1.setText("Marks Obtained: ");
getContentPane().add(rsl1, new org.netbeans.lib.awtextra.AbsoluteConstraints(383, 252, 590,
120));
rsl2.setFont(new java.awt.Font("Verdana", 1, 60)); // NOI18N
rsl2.setText("Marks Obtained: ");
getContentPane().add(rsl2, new org.netbeans.lib.awtextra.AbsoluteConstraints(383, 252, 590,
120));
rsl3.setFont(new java.awt.Font("Verdana", 1, 60)); // NOI18N
rsl3.setText("Marks Obtained: ");
getContentPane().add(rsl3, new org.netbeans.lib.awtextra.AbsoluteConstraints(383, 252, 590,
120));
jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/quiz/pages background
student.jpg"))); // NOI18N
getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1230,
600));
65
pack();
setLocationRelativeTo(null);
}// </editor-fold>
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setVisible(false);
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Submit.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Submit.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Submit.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Submit.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
66
new Submit().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel rsl;
private javax.swing.JLabel rsl1;
private javax.swing.JLabel rsl2;
private javax.swing.JLabel rsl3;
// End of variables declaration
}
Admin Login
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package quiz;
import javax.swing.*;
/**
*
* @author HP-PC
*/
public class AdminHome extends javax.swing.JFrame {
public static int open=0;
/**
* Creates new form AdminHome
*/
public AdminHome() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
67
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jMenuBar1 = new javax.swing.JMenuBar();
Addnewquest = new javax.swing.JMenu();
Updateques = new javax.swing.JMenu();
Allques = new javax.swing.JMenu();
Delete = new javax.swing.JMenu();
res = new javax.swing.JMenu();
MenuLg = new javax.swing.JMenu();
MenuExt = new javax.swing.JMenu();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setUndecorated(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/index
background.png"))); // NOI18N
getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -120, -1,
770));
jMenuBar1.setBackground(new java.awt.Color(255, 0, 51));
jMenuBar1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Navigation Bar",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 36),
new java.awt.Color(255, 0, 0))); // NOI18N
Addnewquest.setIcon(new javax.swing.ImageIcon(getClass().getResource("/add new
question.png"))); // NOI18N
Addnewquest.setText("Add New Question");
Addnewquest.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N
Addnewquest.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
AddnewquestMouseClicked(evt);
}
});
jMenuBar1.add(Addnewquest);
Updateques.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Update
Question.png"))); // NOI18N
Updateques.setText("Update Questiion");
Updateques.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N
Updateques.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
UpdatequesMouseClicked(evt);
68
}
});
jMenuBar1.add(Updateques);
Allques.setIcon(new javax.swing.ImageIcon(getClass().getResource("/all questions.png"))); //
NOI18N
Allques.setText("All Question");
Allques.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N
Allques.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
AllquesMouseClicked(evt);
}
});
jMenuBar1.add(Allques);
Delete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/delete Question.png")));
// NOI18N
Delete.setText("Delete Question");
Delete.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N
Delete.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
DeleteMouseClicked(evt);
}
});
jMenuBar1.add(Delete);
res.setIcon(new javax.swing.ImageIcon(getClass().getResource("/quiz/all student
result.png"))); // NOI18N
res.setText("All Student Result");
res.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N
res.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
resMouseClicked(evt);
}
});
jMenuBar1.add(res);
MenuLg.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Logout.png"))); //
NOI18N
MenuLg.setText("Log Out");
MenuLg.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N
MenuLg.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
MenuLgMouseClicked(evt);
}
});
MenuLg.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
69
MenuLgActionPerformed(evt);
}
});
jMenuBar1.add(MenuLg);
MenuExt.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); //
NOI18N
MenuExt.setText("Exit");
MenuExt.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N
MenuExt.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
MenuExtMouseClicked(evt);
}
});
MenuExt.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
MenuExtActionPerformed(evt);
}
});
jMenuBar1.add(MenuExt);
setJMenuBar(jMenuBar1);
pack();
setLocationRelativeTo(null);
}// </editor-fold>
private void MenuLgMouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
int a=JOptionPane.showConfirmDialog(jf,"Do you want to
Logout","Select",JOptionPane.YES_NO_OPTION);
if(a==0)
{
this.setVisible(false);
new LoginAdmin().setVisible(true);
}
}
private void MenuExtMouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
int a=JOptionPane.showConfirmDialog(jf,"Do you want to
Exit","Select",JOptionPane.YES_NO_OPTION);
if(a==0)
{
70
System.exit(0);
}
}
private void AddnewquestMouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
if(open==0)
{
new AddNewQues().setVisible(true);
open=1;
}
else
{
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,"one form already open");
}
}
private void UpdatequesMouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
if(open==0)
{
new UpdateQues().setVisible(true);
open=1;
}
else
{
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,"one form already open");
}
}
private void AllquesMouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
if(open==0)
{
new AllQues().setVisible(true);
open=1;
}
else
{
JFrame jf=new JFrame();
71
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,"one form already open");
}
}
private void DeleteMouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
if(open==0)
{
new Delete().setVisible(true);
open=1;
}
else
{
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,"one form already open");
}
}
private void MenuExtActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void MenuLgActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void resMouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
if(open==0)
{
new result().setVisible(true);
open=1;
}
else
{
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,"one form already open");
}
}
/**
* @param args the command line arguments
72
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(AdminHome.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(AdminHome.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(AdminHome.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(AdminHome.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new AdminHome().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JMenu Addnewquest;
private javax.swing.JMenu Allques;
private javax.swing.JMenu Delete;
private javax.swing.JMenu MenuExt;
private javax.swing.JMenu MenuLg;
73
private javax.swing.JMenu Updateques;
private javax.swing.JLabel jLabel1;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenu res;
// End of variables declaration
}
Add Question
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package quiz;
import javax.swing.*;
import java.sql.*;
import Project.ConnectionProvider;
/**
*
* @author HP-PC
*/
public class AddNewQues extends javax.swing.JFrame {
/**
* Creates new form AddNewQues
*/
public AddNewQues() {
initComponents();
try{
Connection con=ConnectionProvider.getCon();
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("select count(Id)from question");
if(rs.first())
{
int id=rs.getInt(1);
id=id+1;
String str=String.valueOf(id);
idlbl.setText(str);
}
else
{
idlbl.setText("1");
}
}
74
catch(Exception ex)
{
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,ex);
}
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
CmdClose = new javax.swing.JButton();
jSeparator1 = new javax.swing.JSeparator();
idlbl = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
qtf = new javax.swing.JTextField();
ootf = new javax.swing.JTextField();
totf = new javax.swing.JTextField();
ttotf = new javax.swing.JTextField();
fotf = new javax.swing.JTextField();
atf = new javax.swing.JTextField();
jLabel11 = new javax.swing.JLabel();
CmdSave = new javax.swing.JButton();
CmdClear = new javax.swing.JButton();
jLabel12 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setAlwaysOnTop(true);
setUndecorated(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/add new
question.png"))); // NOI18N
getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1,
64));
75
jLabel2.setFont(new java.awt.Font("Algerian", 1, 48)); // NOI18N
jLabel2.setText("Add New Question");
getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(67, 0, 734,
-1));
CmdClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); //
NOI18N
CmdClose.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CmdCloseActionPerformed(evt);
}
});
getContentPane().add(CmdClose, new org.netbeans.lib.awtextra.AbsoluteConstraints(990, 0,
80, 80));
getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 77,
1066, 10));
idlbl.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
idlbl.setForeground(new java.awt.Color(255, 0, 0));
idlbl.setText("00");
getContentPane().add(idlbl, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 110, 148,
-1));
jLabel5.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel5.setText(" Option 1:");
getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(35, 196,
117, -1));
jLabel6.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel6.setText("Question :");
getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(41, 148,
117, -1));
jLabel7.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel7.setText(" Option 2:");
getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(35, 229, -1,
-1));
jLabel8.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel8.setText(" Option 3:");
getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(35, 268, -1,
-1));
jLabel9.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel9.setText(" Option 4:");
getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(35, 307, -1,
-1));
76
jLabel10.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel10.setText("Answer :");
getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(41, 342,
105, 34));
qtf.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
getContentPane().add(qtf, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 145, 660,
33));
ootf.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
getContentPane().add(ootf, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 196, 660,
-1));
totf.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
getContentPane().add(totf, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 231, 660,
30));
ttotf.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
getContentPane().add(ttotf, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 268, 660,
-1));
fotf.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
getContentPane().add(fotf, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 307, 660,
-1));
atf.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
getContentPane().add(atf, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 342, 660,
34));
jLabel11.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel11.setText("Question Id:");
getContentPane().add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(41, 112,
148, -1));
CmdSave.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
CmdSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/save.png"))); //
NOI18N
CmdSave.setText("Save");
CmdSave.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CmdSaveActionPerformed(evt);
}
});
getContentPane().add(CmdSave, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 418,
-1, -1));
CmdClear.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
77
CmdClear.setIcon(new javax.swing.ImageIcon(getClass().getResource("/clear.png"))); //
NOI18N
CmdClear.setText("Clear");
CmdClear.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CmdClearActionPerformed(evt);
}
});
getContentPane().add(CmdClear, new org.netbeans.lib.awtextra.AbsoluteConstraints(419,
418, -1, -1));
jLabel12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pages background
admin.jpg"))); // NOI18N
getContentPane().add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(-2, -6, -1,
540));
pack();
setLocationRelativeTo(null);
}// </editor-fold>
private void CmdSaveActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String id= idlbl.getText();
String q= qtf.getText();
String o1= ootf.getText();
String o2= totf.getText();
String o3= ttotf.getText();
String o4=fotf.getText();
String a=atf.getText();
try{
Connection con=ConnectionProvider.getCon();
PreparedStatement ps=con.prepareStatement("insert into question values(?,?,?,?,?,?,? )");
ps.setString(1, id);
ps.setString(2, q);
ps.setString(3, o1);
ps.setString(4, o2);
ps.setString(5, o3);
ps.setString(6, o4);
ps.setString(7, a);
ps.executeUpdate();
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,"Succefully Update");
setVisible(false);
new AddNewQues().setVisible(true);
}
catch(Exception ex)
78
{
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,ex);
}
}
private void CmdClearActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
qtf.setText("");
ootf.setText("");
totf.setText("");
ttotf.setText("");
fotf.setText("");
atf.setText("");
}
private void CmdCloseActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
AdminHome.open=0;
setVisible(false);
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(AddNewQues.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (InstantiationException ex) {
79
java.util.logging.Logger.getLogger(AddNewQues.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(AddNewQues.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(AddNewQues.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new AddNewQues().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton CmdClear;
private javax.swing.JButton CmdClose;
private javax.swing.JButton CmdSave;
private javax.swing.JTextField atf;
private javax.swing.JTextField fotf;
private javax.swing.JLabel idlbl;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JTextField ootf;
private javax.swing.JTextField qtf;
private javax.swing.JTextField totf;
private javax.swing.JTextField ttotf;
// End of variables declaration
}
Update Question
80
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package quiz;
import java.sql.*;
import Project.ConnectionProvider;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
/**
*
* @author HP-PC
*/
public class UpdateQues extends javax.swing.JFrame {
/**
* Creates new form UpdateQues
*/
public UpdateQues() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
CmdClose = new javax.swing.JButton();
jSeparator1 = new javax.swing.JSeparator();
jLabel3 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
itf = new javax.swing.JTextField();
qtf = new javax.swing.JTextField();
ootf = new javax.swing.JTextField();
totf = new javax.swing.JTextField();
ttotf = new javax.swing.JTextField();
fotf = new javax.swing.JTextField();
atf = new javax.swing.JTextField();
CmdSearch = new javax.swing.JButton();
81
CmdUpdate = new javax.swing.JButton();
CmdClear = new javax.swing.JButton();
jLabel4 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setAlwaysOnTop(true);
setUndecorated(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Update Question.png"))); //
NOI18N
getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 52, 69));
jLabel2.setFont(new java.awt.Font("Algerian", 1, 48)); // NOI18N
jLabel2.setText("Update Question");
getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(59, 0, 479, 69));
CmdClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); // NOI18N
CmdClose.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CmdCloseActionPerformed(evt);
}
});
getContentPane().add(CmdClose, new org.netbeans.lib.awtextra.AbsoluteConstraints(1000, 0, 60, -1));
getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 76, 1065,
10));
jLabel3.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel3.setText("Question Id :");
getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 90, 155, -1));
jLabel5.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel5.setText("Question :");
getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 130, 145, -1));
jLabel6.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel6.setText("Option 1:");
getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 180, 136, -1));
jLabel7.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel7.setText("Option 2:");
getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 220, 116, -1));
jLabel8.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel8.setText("Option 3:");
getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 260, -1, -1));
jLabel9.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel9.setText("Option 4:");
getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 300, -1, -1));
jLabel10.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf
projectreport.pdf

More Related Content

Similar to projectreport.pdf

Hrms industrial training report
Hrms industrial training reportHrms industrial training report
Hrms industrial training reportNitesh Dubey
 
Case Study 3 - Portfolio Project Final - Google UX Design Certificate
Case Study 3 - Portfolio Project Final - Google UX Design CertificateCase Study 3 - Portfolio Project Final - Google UX Design Certificate
Case Study 3 - Portfolio Project Final - Google UX Design CertificateAbelKCS
 
Focused Question and Answer for Job Portal
Focused Question and Answer for Job PortalFocused Question and Answer for Job Portal
Focused Question and Answer for Job PortalIRJET Journal
 
Dot Net Developer with 3.11 Years of experience
Dot Net Developer with 3.11 Years of experienceDot Net Developer with 3.11 Years of experience
Dot Net Developer with 3.11 Years of experiencePooja Sharma
 
Developers Nepal Meetup #4 Report
Developers Nepal Meetup #4 ReportDevelopers Nepal Meetup #4 Report
Developers Nepal Meetup #4 ReportPunit Jajodia
 
Mohit Gupta Resume
Mohit Gupta ResumeMohit Gupta Resume
Mohit Gupta ResumeMOHIT GUPTA
 
TECHNICAL RESOURCE PORTAL_JUHI
TECHNICAL RESOURCE PORTAL_JUHITECHNICAL RESOURCE PORTAL_JUHI
TECHNICAL RESOURCE PORTAL_JUHIJuhi Sharma
 
quizapplication-190520075937.pdf
quizapplication-190520075937.pdfquizapplication-190520075937.pdf
quizapplication-190520075937.pdfshubham504451
 
Quiz application
Quiz applicationQuiz application
Quiz applicationHarsh Verma
 
Durgesh o level_2nd_part
Durgesh o level_2nd_partDurgesh o level_2nd_part
Durgesh o level_2nd_partDurgesh Singh
 
DevOps Model: What is DevOps and Its Benefits
DevOps Model: What is DevOps and Its BenefitsDevOps Model: What is DevOps and Its Benefits
DevOps Model: What is DevOps and Its BenefitsDashTechnologiesInc
 
React Native App Development.
React Native App Development.React Native App Development.
React Native App Development.Techugo
 
Internship template for review 1
Internship template for review 1Internship template for review 1
Internship template for review 1Lahari Gowda
 
Application(Technical) Support Engineer Having Overall 4.6 years Of EXP
Application(Technical) Support Engineer  Having Overall 4.6 years Of EXPApplication(Technical) Support Engineer  Having Overall 4.6 years Of EXP
Application(Technical) Support Engineer Having Overall 4.6 years Of EXPHitesh Kushwaha
 

Similar to projectreport.pdf (20)

Hrms industrial training report
Hrms industrial training reportHrms industrial training report
Hrms industrial training report
 
Case Study 3 - Portfolio Project Final - Google UX Design Certificate
Case Study 3 - Portfolio Project Final - Google UX Design CertificateCase Study 3 - Portfolio Project Final - Google UX Design Certificate
Case Study 3 - Portfolio Project Final - Google UX Design Certificate
 
Focused Question and Answer for Job Portal
Focused Question and Answer for Job PortalFocused Question and Answer for Job Portal
Focused Question and Answer for Job Portal
 
Dot Net Developer with 3.11 Years of experience
Dot Net Developer with 3.11 Years of experienceDot Net Developer with 3.11 Years of experience
Dot Net Developer with 3.11 Years of experience
 
Deep_Kamal
Deep_KamalDeep_Kamal
Deep_Kamal
 
Developers Nepal Meetup #4 Report
Developers Nepal Meetup #4 ReportDevelopers Nepal Meetup #4 Report
Developers Nepal Meetup #4 Report
 
Mohit Gupta Resume
Mohit Gupta ResumeMohit Gupta Resume
Mohit Gupta Resume
 
TECHNICAL RESOURCE PORTAL_JUHI
TECHNICAL RESOURCE PORTAL_JUHITECHNICAL RESOURCE PORTAL_JUHI
TECHNICAL RESOURCE PORTAL_JUHI
 
quizapplication-190520075937.pdf
quizapplication-190520075937.pdfquizapplication-190520075937.pdf
quizapplication-190520075937.pdf
 
Quiz application
Quiz applicationQuiz application
Quiz application
 
Omkar_Resume (1)
Omkar_Resume (1)Omkar_Resume (1)
Omkar_Resume (1)
 
Durgesh o level_2nd_part
Durgesh o level_2nd_partDurgesh o level_2nd_part
Durgesh o level_2nd_part
 
Bharath_Java
Bharath_JavaBharath_Java
Bharath_Java
 
DevOps Model: What is DevOps and Its Benefits
DevOps Model: What is DevOps and Its BenefitsDevOps Model: What is DevOps and Its Benefits
DevOps Model: What is DevOps and Its Benefits
 
Lavina CV
Lavina CVLavina CV
Lavina CV
 
Mobile Devlopment Anubavam
Mobile Devlopment  AnubavamMobile Devlopment  Anubavam
Mobile Devlopment Anubavam
 
React Native App Development.
React Native App Development.React Native App Development.
React Native App Development.
 
Internship template for review 1
Internship template for review 1Internship template for review 1
Internship template for review 1
 
Application(Technical) Support Engineer Having Overall 4.6 years Of EXP
Application(Technical) Support Engineer  Having Overall 4.6 years Of EXPApplication(Technical) Support Engineer  Having Overall 4.6 years Of EXP
Application(Technical) Support Engineer Having Overall 4.6 years Of EXP
 
Sachin CV
Sachin CVSachin CV
Sachin CV
 

Recently uploaded

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 

Recently uploaded (20)

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 

projectreport.pdf

  • 1. 1 A Project Report Quiz Management System Session 2021-22 Submitted To MR RAVI TIWARI Submitted By: ABHISHEK KUMAR GUPTA 201750040004
  • 2. 2
  • 3. 3 About The Organization APT Technosoft was established by group of experienced and techno savvy engineers in 2005 at Lucknow. As on today the company has grown to become a Private limited company and our performance in delivering quality product in various field of computer services as made us a leading organization and has obtain ISO 9001-2008 certification. We have expanded our activities and operation to meet the requirement of our clients. An office at Delhi has been started to cater requirement of Delhi based clients. Mission Our mission is to develop most cost effective and latest technology. System based solution for organization. Our solution has capability for extendibility and can be upgraded as and when required. Our association with client is not limited to execution of order rather we wish to maintain a close relation to services as and when required. Our Vision We think them exist an efficient and economical solution to any business problem and we endeavor to provide the most economical solution to ensure your business growth.
  • 4. 4 Branch office in India Development Office - ➢ D-1012/1, Indira Nagar, Lucknow (U.P.). ➢ 35 ,Punjabipura,Delhi Road, Brambhpuri Meerut (U.P. West). Marketing Office : – ➢ 50, Chanakya Puri , Indira Nagar , Lucknow(U.P.). Email : info@aptTechnosoft.com Phone : +91 -5223559053
  • 5. 5 Acknowledgment I would like to express my deep and sincere gratitude to APT Technosoft (An ISO 9001:2008) who gave me full support and encouraged me to work in their company for my summer training. I am deeply grateful to Mr. Sandeep Kumar Singh for his help and Support provided at every step of the project. Last but not the least, I thank to all my colleagues for their support and co- operation. Team Members: Abhishek Kumar Gupta Utkarsh Pandey
  • 6. 6 Table Of Content S.N Topic Name Page No. 1. Preface 7 2. About the language 8 3 Introduction 9 4 System overview 12 5 Justification of Platform 14 6 Database 20 7 Screenshot 22 8 Sample code 29 9 Testing 111 10 conclusion 112
  • 7. 7 PREFACE Since Software development is difficult and complex process, which require a deep thinking, Clear concept and efficient logic to solve problem arises during development. So only a few persons really successes, for a good software developer must have clear concept for situation and great commands on a language which is used to make proposed software. It also required long time patient, better understanding and working capability in groups. About 15 years ago software development is very tedious task, because few languages (C, Assembly) are available that is not so powerful and easier in use, thus software formulation takes long time and consistency. Now these days a lot of powerful language and technologies (Java, VB.Net, ASP.Net, JSP.Net) are came in existence which has special feature and have built in controls in graphical shapes that help me to Rapid Application Development. In these days software covers all economical area in India but unfortunately it is not spread out as well as foreign countries. This is my first to convert our Complex in digitized form that’s done manually that is time consuming and high-cost requirement process. The proposed system development gradually by deep thinking, lot of discussion and followed by some important rules that are used in software development. I am extremely thankful to Mr. Sandeep Kumar Singh (Project Manager, APT Technosft) that has helped me in numerous ways, without whose active co-operation this system could not have been completed.
  • 8. 8 About the language What is Java ? Java is a programming language and platform. Platform is any hardware or software environment in which program runs, known as platform. Since java has its own Runtime Environment (JRE) and its api called platform. Java was invented by James Gosling at Sun Microsystems Introduced in 1991.It took 18 months to develop first working version of Java. This Language was initially called Oak( ) but was renamed Java in 1995. Initially Java was used for building the software for the electronic devices like TV, VCRs and so on. Java Compilation Process Java is a language which uses both type of approach compile & Interpreter.
  • 9. 9 ByteCode :-- When we compile any java program with java compiler then compiler produce a class file. The Class file contains java Bytecode. We can run java Bytecode with any type of processor & O.S, without changes in source code. Same code can be run with different-2 platform. ByteCode instruction is not a machine instruction. This is not a type instruction which can understand by Microprocessor directly. This is an Intermediate Instruction. In Second Phase with the help of Interpreter we can change ByteCode instruction into machine instruction. Before getting deeply into the subject we will first know how Businesses are related to Internet. As per the product documentation from a business perspective, there are three phases of the Internet. The First phase gets back to the early 1990's when Internet first came into general use and which brought a big revolution for Businesses. In the First phase of the Internet Businesses designed and launched their website’s and focused on the number of hits to know how many customers were visiting their site and interested in their products, etc. The Second phase is what we are in right now and in this phase, Businesses are generating revenue through Online Transactions. We are now moving into the Third phase of the Internet where profit is the main priority. The focus here is to Businesses effectively communicated with their customers and partners who are geographically isolated participate in Digital Economy and deliver a wide range of services. How can that be possible? The answer, with Java.
  • 10. 10 Introduction The project: “Quiz Application” is a collection of number of different types of quizzes like technical, games, sports, etc. A user can access/play the entire quiz and can attempt any of the one. There will be limited number of questions and for each correct answer user will get a credit score. User can see answers as well as can ask a query related to it. There are many quiz applications available currently on internet. But there are few which provide better understanding between users and the appletes application like, providing proper answers, user query Solving, uploading user questions as well as answer to it, etc. To develop a user friendly quiz application. which will contain : Numbers of quiz, Answers to every question, Query solving regarding any question, Uploading of user question and answer, and to improve the knowledge level of users. To develop an application which will contain solution to the above problems. By this application the user will come to know about his/her level and can learn additional knowledge. Also by this application a user can expand his/her knowledge among the world.
  • 11. 11 Aim and Objective: ❖ Aim: “Our aim is to develop an application for the users in which a user can attempt any number of quizzes related to his/her choice.” ❖ Objective: The main objective of “Quiz Application” is to facilitate a user friendly environment for all users and reduces the manual effort. In past days quiz is conducted manually but in further resolution of the technology we are able to generate the score and pose the queries automatically. The functional requirements include creating users that are going to participate in the quiz, automatic score and report generation and administrative tasks like add, delete, update for admin privilege users. In this application, all the permissions lies with the administrator i.e., specifying the details of the quiz with checking result will show to interviewee or not, addition of question and answers, marks for each question, Set timer for each quiz and generate report with score for each quiz. Purpose, Scope and Applicability: Purpose: This web application provides facility to Play online quiz and practice Grammar, Aptitude, and G.K., It provides a good platform, where a student not only judges there knowledge/skill but also they can improve knowledge/skill at the same time. Scope: The Scope of this project is very broad in terms of gaining knowledge and sharing knowledge among worlds. Few points are: - • Can be used anywhere and anytime as it is a web-based application. • This application will be used in educational institutions as well as in the corporate world. Applicability: Anyone, whether a newcomer or professional, willing to learn they can choose it. All users will have access to all subject containing subtopics Users will receive the best experience without any interruptions.
  • 12. 12 Description: Firstly, we have to make interfaces for Home Page, Login Page, Questions Attempting forum, Result Page, & Profile of user. These all pages have connectivity with the server and database. So, that it can work properly. Currently, there are websites which only provide limited number of quizzes related to different domain. Many websites do not have a single platform for quizzes related to technical, G.K, Aptitude, Games, etc. And there is not a website where the users can upload his/her questions and answers for the others. We have to develop an application which can resolve all of the above problems. By this user can gain knowledge, can solve his/her query, and spread his/her knowledge among the world. Methodology: The programming language used for the development of the project is JAVA. MySQL is used for Database. Assumptions: We assume that the users of our Application should have a minimal Knowledge of computer system and should have an availability of internet. We are dependent on the sources from where we have gathered the data and the data are authenticated.
  • 13. 13 Proposed System: Unlike the other Application where you need to make account for every quiz you want to play, but using this application, you just have to login by user name and password and then you will get access to all quizzes from it. The proposed system is an application will help in improving the knowledge and accuracy. Requirement Analysis: Hardware Requirement : Most current Computers and Laptop have enough specifications to be used to create an Application. The most important specification to check on the computer would be the size of the RAM, which should be over 2 GB, more is better. This will ensure that the computer runs quickly and smoothly, even with heavier programs. The computer should have a keyboard and mouse attached and working as well. S.NO NAME HARDWARE 1 Processor Intel dual core (32 bit) 2 RAM 4 GB 3 Processor Speed 2 GHz Software Requirement: Aside from a Computer and internet connection, most of the tools you need to build an Application are Software Program. Some of which may already be on your computer S.NO NAME SOFTWARE 1 Platform Windows 7,8,8.1,10,11 2 Language Used Net beans 3 Database tool MySQL
  • 14. 14 Justification of Platform: Justification means why I choose this project to make because not just for making Project for College It is for improving my skills. ❖Why Net beans : Net beans is an open-source Integrated Development Environment (IDE) . It is used to develop applications with JAVA, PHP, C++, HTML and many other Programming languages. The applications are developed using modules in JAVA. Net beans can run on any operating system such as windows, Macos, Linux etc. Apache Net beans provides editors, wizards and templates to help you create applications in JAVA, PHP and many other languages. The IDE simplifies the development of web, enterprise, desktop and mobile applications that use .The JAVA and HTML5 platforms. Advantages: • Netbeans is very efficient in code development and java web development. • Netbeans is a great tool to small as it is quite easy to use. its integration is great with other tools. ❖ Why MySQL: MySQL is a relational database management system based on SQL- Structure Query Language. The application is used for a wide range of purposes, including data warehousing, e-commerce and logging applications. The most common use for MySQL is for the purpose of a web database. MySQL creates a database for storing and manipulating data, defining the relationship of each table. Clients can make request by typing specific SQL statements on MySQL. Advantages: • MySQL is more secure. • MySQL is available for free to download and use from the official site of MySQL.
  • 15. 15 Requirements Specification The systems primary focus should be on providing a user friendly easy to understand interface, which can be used easily and simply by anyone. Functional Requirements: System Feature- This section gives a functional requirement that applicable to the online Quiz. There are two modules in this phase: • Student/user module. • Admin module. Functionality of each module are: Student/user module: The student/user have to login in application. They can choose any of the given Quiz. Then the student/user will get result immediately after the completion of test. Admin module: The admin can see all the tables in the Database and can add the Question by selecting the particular topic. Product Preliminary Description: Product Perspective: The Quiz Application is an educational platform built for those students and professionals who have interest in Government exams and gaining knowledge. The admin of our application can keep all the Quizzes updated all the time so that members get updated information. Here, various Quizzes will be available with different topics and description. Users can provide their valuable feedback and even contact us if there is any issue. The main users are : Admin (who can add, update or remove any Quiz and information)and Members (who are here to study).
  • 16. 16 Waterfall Process model The Classical Life Cycle or waterfall Process Model was the first process model to present a sequential framework, describing basic stages that are mandatory for a successful software development model. It formed the basis for most software development standards and consists of the following phases: Requirement analysis, design, coding, testing, and maintenance. Advantages of waterfall model: • Simple goal. • Simple to understand and use. • Clearly defined stages. • Easy to arrange tasks. • Process and result are well documented. • Customers / end users already know about it. • Easy to manage. Disadvantage of Waterfall model: • Rigid design and inflexible procedure. • Waterfall model faced “Inflexible point solution” which meant even small amendments in the design were difficult to incorporate later design phase. • As the requirement were froze before moving to the design phase, using the incomplete set of requirement, a complete design was worked amendments In case of a large project, completing a phase and then moving back to reconstruct the same phase, incurred a large overhead. • Once a phase is done, it is not repeated again that is movement in the waterfall goes one to the next and the vice versa is not supported, deadlines are difficult to meet I case of large projects.
  • 17. 17
  • 19. 19
  • 20. 20 Database A database is information that is set up for easy access, management and updating. Computer databases typically store aggregations of data records or files that contain information, such as sales transactions, customer data, financials and product information. Quiz Table:
  • 29. 29 Simple Code Main Page /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package quiz; import java.awt.Toolkit; import javax.swing.JOptionPane; /** * * @author HP-PC */ public class Mpage extends javax.swing.JFrame { /** * Creates new form Mpage */ public Mpage() { initComponents(); setIcon(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jButton1 = new javax.swing.JButton(); CmdAdmin = new javax.swing.JButton();
  • 30. 30 CmdExit = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); setTitle("QUIZ"); setFont(new java.awt.Font("Algerian", 0, 12)); // NOI18N getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jButton1.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/index student.png"))); // NOI18N jButton1.setText("Student"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 0, 200, 70)); CmdAdmin.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N CmdAdmin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/index admin.png"))); // NOI18N CmdAdmin.setText("Admin"); CmdAdmin.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CmdAdminActionPerformed(evt); } }); getContentPane().add(CmdAdmin, new org.netbeans.lib.awtextra.AbsoluteConstraints(910, 0, 180, 70)); CmdExit.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N CmdExit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); // NOI18N CmdExit.setText("Exit"); CmdExit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CmdExitActionPerformed(evt); } }); getContentPane().add(CmdExit, new org.netbeans.lib.awtextra.AbsoluteConstraints(1090, 0, 180, 70)); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/index background.png"))); // NOI18N getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1290, 630));
  • 31. 31 pack(); setLocationRelativeTo(null); }// </editor-fold> private void CmdAdminActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: this.setVisible(false); new LoginAdmin().setVisible(true); } private void CmdExitActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: int a=JOptionPane.showConfirmDialog(this,"Do you really Exit Application","Select",JOptionPane.YES_NO_OPTION); if(a==0) { System.exit(0); } } private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: this.setVisible(false); new StudentDetails().setVisible(true); } /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Mpage.class.getName()).log(java.util.logging.Level.SEVERE,
  • 32. 32 null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Mpage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Mpage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Mpage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Mpage().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JButton CmdAdmin; private javax.swing.JButton CmdExit; private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; // End of variables declaration private void setIcon() { setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("abc.jpg"))); } } User Registration /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package quiz; import java.sql.*;
  • 33. 33 import java.text.SimpleDateFormat; import java.util.Date; import Project.ConnectionProvider; import java.awt.Color; import java.awt.color.*; import javax.swing.JOptionPane; /** * * @author HP-PC */ public class StudentDetails extends javax.swing.JFrame { /** * Creates new form StudentDetails */ public StudentDetails() { initComponents(); SimpleDateFormat dform=new SimpleDateFormat("dd-MM-yyyy"); Date date=new Date(); dlbl.setText(dform.format(date)); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); dlbl = new javax.swing.JLabel(); CmdBack = new javax.swing.JButton(); CmdClose = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel();
  • 34. 34 jLabel12 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); jLabel14 = new javax.swing.JLabel(); jLabel15 = new javax.swing.JLabel(); rtf = new javax.swing.JTextField(); ntf = new javax.swing.JTextField(); ftf = new javax.swing.JTextField(); mtf = new javax.swing.JTextField(); gcmb = new javax.swing.JComboBox(); ctf = new javax.swing.JTextField(); etf = new javax.swing.JTextField(); hstf = new javax.swing.JTextField(); istf = new javax.swing.JTextField(); hptf = new javax.swing.JTextField(); iptf = new javax.swing.JTextField(); hytf = new javax.swing.JTextField(); iytf = new javax.swing.JTextField(); utf = new javax.swing.JTextField(); gptf = new javax.swing.JTextField(); gytf = new javax.swing.JTextField(); CmdSave = new javax.swing.JButton(); atf = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jLabel16 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setBackground(new java.awt.Color(255, 153, 0)); setUndecorated(true); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/index student.png"))); // NOI18N getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, 59)); jLabel2.setFont(new java.awt.Font("Algerian", 1, 48)); // NOI18N jLabel2.setText("Fill up the form"); getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(67, 0, 445, -1)); jLabel3.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel3.setText("Date:"); getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(606, 13, -1, -1)); dlbl.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
  • 35. 35 dlbl.setText("jLabel4"); getContentPane().add(dlbl, new org.netbeans.lib.awtextra.AbsoluteConstraints(696, 13, -1, - 1)); CmdBack.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N CmdBack.setIcon(new javax.swing.ImageIcon(getClass().getResource("/back student.png"))); // NOI18N CmdBack.setText("Back"); CmdBack.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CmdBackActionPerformed(evt); } }); getContentPane().add(CmdBack, new org.netbeans.lib.awtextra.AbsoluteConstraints(1050, 0, -1, 70)); CmdClose.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N CmdClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); // NOI18N CmdClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CmdCloseActionPerformed(evt); } }); getContentPane().add(CmdClose, new org.netbeans.lib.awtextra.AbsoluteConstraints(1200, 0, -1, 70)); getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 70, 1370, 10)); jLabel5.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel5.setText("Roll no"); getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 80, 100, 20)); jLabel6.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel6.setText("Name"); getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 120, -1, -1)); jLabel7.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel7.setText("Father Name"); getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 149, -1, -1)); jLabel8.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel8.setText("Mother Name"); getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 193, -1, -1));
  • 36. 36 jLabel9.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel9.setText("Contact Number"); getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 274, -1, -1)); jLabel10.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel10.setText("Email"); getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 318, - 1, -1)); jLabel11.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel11.setText("Gender"); getContentPane().add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 237, - 1, -1)); jLabel12.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel12.setText("10th"); getContentPane().add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 364, - 1, -1)); jLabel13.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel13.setText("12th"); getContentPane().add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 408, - 1, -1)); jLabel14.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel14.setText("Graduation"); getContentPane().add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 452, - 1, -1)); jLabel15.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel15.setText("Address"); getContentPane().add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 496, - 1, -1)); rtf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N rtf.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rtfActionPerformed(evt); } }); getContentPane().add(rtf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 80, 200, - 1)); ntf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N getContentPane().add(ntf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 120, 510, - 1));
  • 37. 37 ftf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N getContentPane().add(ftf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 160, 510, - 1)); mtf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N getContentPane().add(mtf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 200, 510, -1)); gcmb.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N gcmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Male", "Female", "Others" })); getContentPane().add(gcmb, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 240, 510, -1)); ctf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N getContentPane().add(ctf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 280, 510, - 1)); etf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N getContentPane().add(etf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 320, 510, - 1)); hstf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N hstf.setForeground(new java.awt.Color(204, 204, 204)); hstf.setText("Enter Your University Name"); hstf.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { hstfFocusGained(evt); } }); getContentPane().add(hstf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 360, 300, -1)); istf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N istf.setForeground(new java.awt.Color(204, 204, 204)); istf.setText("Enter Your University Name"); istf.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { istfFocusGained(evt); } }); getContentPane().add(istf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 400, 300, - 1)); hptf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N hptf.setForeground(new java.awt.Color(204, 204, 204)); hptf.setText("Percentage");
  • 38. 38 hptf.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { hptfFocusGained(evt); } }); getContentPane().add(hptf, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 360, 130, -1)); iptf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N iptf.setForeground(new java.awt.Color(204, 204, 204)); iptf.setText("Percentage"); iptf.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { iptfFocusGained(evt); } }); getContentPane().add(iptf, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 400, 130, -1)); hytf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N hytf.setForeground(new java.awt.Color(204, 204, 204)); hytf.setText("Year Passout"); hytf.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { hytfFocusGained(evt); } }); getContentPane().add(hytf, new org.netbeans.lib.awtextra.AbsoluteConstraints(720, 360, 150, -1)); iytf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N iytf.setForeground(new java.awt.Color(204, 204, 204)); iytf.setText("Year Passout"); iytf.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { iytfFocusGained(evt); } }); getContentPane().add(iytf, new org.netbeans.lib.awtextra.AbsoluteConstraints(720, 400, 150, -1)); utf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N utf.setForeground(new java.awt.Color(204, 204, 204)); utf.setText("Enter Your University Name"); utf.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { utfFocusGained(evt); }
  • 39. 39 }); getContentPane().add(utf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 440, 300, - 1)); gptf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N gptf.setForeground(new java.awt.Color(204, 204, 204)); gptf.setText("Percentage"); gptf.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { gptfFocusGained(evt); } }); getContentPane().add(gptf, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 440, 130, -1)); gytf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N gytf.setForeground(new java.awt.Color(204, 204, 204)); gytf.setText("Year Passout"); gytf.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { gytfFocusGained(evt); } }); getContentPane().add(gytf, new org.netbeans.lib.awtextra.AbsoluteConstraints(720, 440, 150, -1)); CmdSave.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N CmdSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/save.png"))); // NOI18N CmdSave.setText("Save & Next"); CmdSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CmdSaveActionPerformed(evt); } }); getContentPane().add(CmdSave, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 560, 250, 50)); atf.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N getContentPane().add(atf, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 500, 850, - 1)); jTextArea1.setEditable(false); jTextArea1.setColumns(20); jTextArea1.setFont(new java.awt.Font("Arial", 0, 18)); // NOI18N jTextArea1.setRows(5); jTextArea1.setText("Before the examination day at digital examinationsnPlease make sure that:n• you have an active user account at UiB. Log on to webmail.uib.no, miside.uib.no or
  • 40. 40 another UiB-service to see if your account is active.n• you remember the password for your UiB- account. If you have forgotten your password, you can change it at sebra.uib.no.n• If you are using your personal laptop, please make sure that you have installed the necessary software and programs before the examination day. It is important that your laptop fulfils the system requirements of the programme.n• You must bring your own power supply for use during the examination.n• If failure to comply with these recommendations results in technical problems that cause a delay in your examination, you cannot expect to be granted extended time.n"); jScrollPane1.setViewportView(jTextArea1); getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(880, 70, 410, 400)); jLabel16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pages background student.jpg"))); // NOI18N getContentPane().add(jLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1310, 700)); jPanel2.setBackground(new java.awt.Color(255, 204, 0)); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 60, Short.MAX_VALUE) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 700, Short.MAX_VALUE) ); getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1300, 0, 60, 700)); pack(); setLocationRelativeTo(null); }// </editor-fold> private void CmdBackActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: this.setVisible(false); new Mpage().setVisible(true); } private void CmdCloseActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: int a=JOptionPane.showConfirmDialog(this,"Do you really Exit Application","Select",JOptionPane.YES_NO_OPTION); if(a==0)
  • 41. 41 { System.exit(0); } } private void hstfFocusGained(java.awt.event.FocusEvent evt) { // TODO add your handling code here: if(hstf.getText().equals("Enter Your University Name")) { hstf.setText(""); hstf.setForeground(new Color(0,0,0)); } } private void istfFocusGained(java.awt.event.FocusEvent evt) { // TODO add your handling code here: if(istf.getText().equals("Enter Your University Name")) { istf.setText(""); istf.setForeground(new Color(0,0,0)); } } private void utfFocusGained(java.awt.event.FocusEvent evt) { // TODO add your handling code here: if(utf.getText().equals("Enter Your University Name")) { utf.setText(""); utf.setForeground(new Color(0,0,0)); } } private void hptfFocusGained(java.awt.event.FocusEvent evt) { // TODO add your handling code here: if(hptf.getText().equals("Percentage")) { hptf.setText(""); hptf.setForeground(new Color(0,0,0)); } } private void iptfFocusGained(java.awt.event.FocusEvent evt) { // TODO add your handling code here: if(iptf.getText().equals("Percentage")) { iptf.setText(""); iptf.setForeground(new Color(0,0,0));
  • 42. 42 } } private void gptfFocusGained(java.awt.event.FocusEvent evt) { // TODO add your handling code here: if(gptf.getText().equals("Percentage")) { gptf.setText(""); gptf.setForeground(new Color(0,0,0)); } } private void hytfFocusGained(java.awt.event.FocusEvent evt) { // TODO add your handling code here: if(hytf.getText().equals("Year Passout")) { hytf.setText(""); hytf.setForeground(new Color(0,0,0)); } } private void iytfFocusGained(java.awt.event.FocusEvent evt) { // TODO add your handling code here: if(iytf.getText().equals("Year Passout")) { iytf.setText(""); iytf.setForeground(new Color(0,0,0)); } } private void gytfFocusGained(java.awt.event.FocusEvent evt) { // TODO add your handling code here: if(gytf.getText().equals("Year Passout")) { gytf.setText(""); gytf.setForeground(new Color(0,0,0)); } } private void CmdSaveActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: String rollno=rtf.getText(); String name=ntf.getText(); String fathername=ftf.getText(); String mothername=mtf.getText(); String gender=(String)gcmb.getSelectedItem(); String contactno=ctf.getText(); String email=etf.getText();
  • 43. 43 String tun=hstf.getText(); String tp=hptf.getText(); String ty=hytf.getText(); String twun=istf.getText(); String twp=iptf.getText(); String twy=iytf.getText(); String gun=utf.getText(); String gp=gptf.getText(); String gy=gytf.getText(); String address=atf.getText(); String mark=""; try{ Connection con=ConnectionProvider.getCon(); PreparedStatement p=con.prepareStatement("insert into student values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); p.setString(1,rollno); p.setString(2,name); p.setString(3,fathername); p.setString(4,mothername); p.setString(5,gender); p.setString(6,contactno); p.setString(7,email); p.setString(8,tun); p.setString(9,tp); p.setString(10,ty); p.setString(11,twun); p.setString(12, twp); p.setString(13,twy); p.setString(14,gun); p.setString(15,gp); p.setString(16,gy); p.setString(17,address); p.setString(18,mark); p.executeUpdate(); setVisible(false); new SetInstruction(rollno).setVisible(true); } catch(Exception ex) { JOptionPane.showMessageDialog(this, ex); } } private void rtfActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: }
  • 44. 44 /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(StudentDetails.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(StudentDetails.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(StudentDetails.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(StudentDetails.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new StudentDetails().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JButton CmdBack; private javax.swing.JButton CmdClose;
  • 45. 45 private javax.swing.JButton CmdSave; private javax.swing.JTextField atf; private javax.swing.JTextField ctf; private javax.swing.JLabel dlbl; private javax.swing.JTextField etf; private javax.swing.JTextField ftf; private javax.swing.JComboBox gcmb; private javax.swing.JTextField gptf; private javax.swing.JTextField gytf; private javax.swing.JTextField hptf; private javax.swing.JTextField hstf; private javax.swing.JTextField hytf; private javax.swing.JTextField iptf; private javax.swing.JTextField istf; private javax.swing.JTextField iytf; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel12; private javax.swing.JLabel jLabel13; private javax.swing.JLabel jLabel14; private javax.swing.JLabel jLabel15; private javax.swing.JLabel jLabel16; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JLabel jLabel9; private javax.swing.JPanel jPanel2; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JSeparator jSeparator1; private javax.swing.JTextArea jTextArea1; private javax.swing.JTextField mtf; private javax.swing.JTextField ntf; private javax.swing.JTextField rtf; private javax.swing.JTextField utf; // End of variables declaration } Set Instruction /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */
  • 46. 46 package quiz; import javax.swing.JOptionPane; /** * * @author HP-PC */ public class SetInstruction extends javax.swing.JFrame { public String rollno; /** * Creates new form SetInstruction */ public SetInstruction() { initComponents(); } public SetInstruction(String rollno1) { //To change body of generated methods, choose Tools | Templates. initComponents(); JOptionPane.showMessageDialog(this, rollno1); rollno=rollno1; } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); jSeparator1 = new javax.swing.JSeparator(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); CmdStart = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel1.setFont(new java.awt.Font("Algerian", 1, 48)); // NOI18N jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/index student.png"))); // NOI18N jLabel1.setText(" Instruction");
  • 47. 47 getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 499, 88)); getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 90, 1048, 10)); jTextArea1.setEditable(false); jTextArea1.setColumns(20); jTextArea1.setFont(new java.awt.Font("Arial", 1, 24)); // NOI18N jTextArea1.setRows(5); jTextArea1.setText(" Before the examination startsn Arrive at the examination venue at least 15 minutes before the start of the examination / 35 minutes before a digital examination.nLaw: The examination starts at the moment the book control begins, and you must therefore be present by 8.20 a.m. for regular written examinations and 8.10 a.m. at digital examinations.nWhen using a laptop at digital examinations, the laptop has to be set up as soon as possible. If you are taking a law exam, the laptop must be set up before the book control.nCoats, backpacks, bags, etc. must be placed as directed. Mobile phones, mp3 players, smartwatches and other electronic devices must be turned off and put away, and cannot be stored in coats or pockets.nIf support material, other than that which is specifically permitted, is found at or by the desk, it may be treated as an attempt to cheat and relevant procedures for cheating will be followed."); jScrollPane1.setViewportView(jTextArea1); getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 119, 1021, 406)); CmdStart.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N CmdStart.setText("Start Quiz /Exam"); CmdStart.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CmdStartActionPerformed(evt); } }); getContentPane().add(CmdStart, new org.netbeans.lib.awtextra.AbsoluteConstraints(306, 557, 397, 59)); jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pages background student.jpg"))); // NOI18N getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1050, 630)); pack(); setLocationRelativeTo(null); }// </editor-fold> private void CmdStartActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: this.setVisible(false); new QuizExam(rollno).setVisible(true); }
  • 48. 48 /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(SetInstruction.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(SetInstruction.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(SetInstruction.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(SetInstruction.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new SetInstruction().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JButton CmdStart; private javax.swing.JLabel jLabel1;
  • 49. 49 private javax.swing.JLabel jLabel2; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JSeparator jSeparator1; private javax.swing.JTextArea jTextArea1; // End of variables declaration } Quiz Exam /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package quiz; import Project.ConnectionProvider; import java.sql.*; import java .awt.event.ActionEvent; import java.awt.event.ActionListener; import java.text.SimpleDateFormat; import java .util.Date; import javax.swing.JOptionPane; import javax.swing.Timer; /** * * @author HP-PC */ public class QuizExam extends javax.swing.JFrame { public String QuestionId="1"; public String answer; public int min=00; public int sec=00; public int marks=0; public void answerCheck(){ String studentAnswer=""; if(rb1.isSelected()) { studentAnswer=rb1.getText(); } else if(rb2.isSelected()) { studentAnswer=rb2.getText(); } else if(rb3.isSelected()) {
  • 50. 50 studentAnswer=rb3.getText(); } else { studentAnswer=rb4.getText(); } if(studentAnswer.equals(answer)) { marks=marks+1; String marks1=String.valueOf(marks); //int m=marks; mk.setText(marks1); } else { } int questionid1=Integer.parseInt(QuestionId); questionid1=questionid1+1; QuestionId=String.valueOf(questionid1); rb1.setSelected(false); rb2.setSelected(false); rb3.setSelected(false); rb4.setSelected(false); } public void question(){ try{ Connection con=ConnectionProvider.getCon(); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select * from question where id='"+QuestionId+"'"); while(rs1.next()) { qn.setText(rs1.getString(1)); qd.setText(rs1.getString(2)); rb1.setText(rs1.getString(3)); rb2.setText(rs1.getString(4)); rb3.setText(rs1.getString(5)); rb4.setText(rs1.getString(6)); answer=rs1.getString(7); } }
  • 51. 51 catch(Exception ex) { JOptionPane.showMessageDialog(this,ex); } int j=Integer.parseInt(qn.getText()); if(j==10) { CmdNext.setVisible(false); } } public void submit(){ answerCheck(); String rollno=rbl.getText(); try{ Connection con=ConnectionProvider.getCon(); Statement st=con.createStatement(); st.executeUpdate("update student set mark='"+marks+"'where rollno='"+rollno+"'"); String marks1=String.valueOf(marks); setVisible(false); new Submit(marks1).setVisible(true); } catch(Exception ex) { JOptionPane.showMessageDialog(this, ex); } } /** * Creates new form QuizExam */ public QuizExam(String rollno) { initComponents(); SimpleDateFormat dform=new SimpleDateFormat("dd-MM-yyyy"); Date date=new Date(); dt.setText(dform.format(date)); rbl.setText(rollno); try{ Connection con=ConnectionProvider.getCon(); Statement st=con.createStatement(); ResultSet rs=st.executeQuery("select * from student where rollno='"+rollno+"'"); while(rs.next()) { nm.setText(rs.getString(2)); }
  • 52. 52 ResultSet rs1=st.executeQuery("select * from question where id='"+QuestionId+"'"); while(rs1.next()) { qn.setText(rs1.getString(1)); qd.setText(rs1.getString(2)); rb1.setText(rs1.getString(3)); rb2.setText(rs1.getString(4)); rb3.setText(rs1.getString(5)); rb4.setText(rs1.getString(6)); answer=rs1.getString(7); } } catch(Exception ex) { JOptionPane.showMessageDialog(this,ex); } setLocationRelativeTo(this); time=new Timer(1000,new ActionListener() { @Override public void actionPerformed(ActionEvent e) { sc.setText(String.valueOf(sec)); mn.setText(String.valueOf(min)); if(sec==60) { sec=00; min++; if(min==10) { time.stop(); answerCheck(); submit(); } } sec++; } }); time.start(); } Timer time; public QuizExam() { initComponents(); } /** * This method is called from within the constructor to initialize the form.
  • 53. 53 * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); dt = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); mn = new javax.swing.JLabel(); sc = new javax.swing.JLabel(); jSeparator1 = new javax.swing.JSeparator(); sc1 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel10 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); jLabel14 = new javax.swing.JLabel(); rbl = new javax.swing.JLabel(); nm = new javax.swing.JLabel(); jLabel17 = new javax.swing.JLabel(); qn = new javax.swing.JLabel(); mk = new javax.swing.JLabel(); qd = new javax.swing.JLabel(); rb1 = new javax.swing.JRadioButton(); rb2 = new javax.swing.JRadioButton(); rb3 = new javax.swing.JRadioButton(); rb4 = new javax.swing.JRadioButton(); CmdNext = new javax.swing.JButton(); CmdSbt = new javax.swing.JButton(); jLabel21 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jPanel1.setBackground(new java.awt.Color(0, 255, 255)); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/index student.png"))); // NOI18N jLabel2.setFont(new java.awt.Font("Algerian", 1, 50)); // NOI18N
  • 54. 54 jLabel2.setText("Welcome"); jLabel3.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel3.setText("Date"); dt.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N dt.setText("jLabel4"); jLabel5.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel5.setText("Total Time:"); jLabel6.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel6.setText("Time Taken"); jLabel7.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel7.setText("10"); mn.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N mn.setForeground(new java.awt.Color(255, 0, 51)); mn.setText("00"); sc.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N sc.setForeground(new java.awt.Color(255, 0, 51)); sc.setText("00"); sc1.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N sc1.setForeground(new java.awt.Color(255, 0, 51)); sc1.setText(":"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(161, 161, 161) .addComponent(jLabel3) .addGap(40, 40, 40) .addComponent(dt) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 323, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
  • 55. 55 false) .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(46, 46, 46) .addComponent(jLabel7)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(42, 42, 42) .addComponent(mn) .addGap(7, 7, 7) .addComponent(sc1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(sc))) .addGap(38, 38, 38)) .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(10, 10, 10) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3) .addComponent(dt) .addComponent(jLabel5) .addComponent(jLabel7)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6) .addComponent(mn) .addComponent(sc) .addComponent(sc1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)) );
  • 56. 56 getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, 140)); jPanel2.setBackground(new java.awt.Color(51, 255, 255)); jLabel10.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel10.setText("Roll no"); jLabel11.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel11.setText("Name"); jLabel12.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel12.setText("Total Question"); jLabel13.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel13.setText("Question No"); jLabel14.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel14.setText("Marks"); rbl.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N rbl.setText("101"); nm.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N nm.setText("Abhishek"); jLabel17.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel17.setText("10"); qn.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N qn.setText("00"); mk.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N mk.setText("00"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel10) .addGap(60, 60, 60) .addComponent(rbl, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
  • 57. 57 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel14) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(mk)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel13) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(qn)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel12) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel17))) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel11) .addGap(49, 49, 49) .addComponent(nm, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(78, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel10) .addComponent(rbl)) .addGap(51, 51, 51) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel11) .addComponent(nm)) .addGap(39, 39, 39) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel12) .addComponent(jLabel17)) .addGap(38, 38, 38) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel13) .addComponent(qn))
  • 58. 58 .addGap(35, 35, 35) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel14) .addComponent(mk)) .addContainerGap(318, Short.MAX_VALUE)) ); getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 138, 410, 630)); qd.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N qd.setText("Question Demo"); getContentPane().add(qd, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 230, 810, - 1)); rb1.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N rb1.setText("jRadioButton1"); rb1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rb1ActionPerformed(evt); } }); getContentPane().add(rb1, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 340, -1, - 1)); rb2.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N rb2.setText("jRadioButton2"); rb2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rb2ActionPerformed(evt); } }); getContentPane().add(rb2, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 420, -1, - 1)); rb3.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N rb3.setText("jRadioButton3"); rb3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rb3ActionPerformed(evt); } }); getContentPane().add(rb3, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 490, -1, - 1)); rb4.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N rb4.setText("jRadioButton4");
  • 59. 59 rb4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rb4ActionPerformed(evt); } }); getContentPane().add(rb4, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 560, -1, - 1)); CmdNext.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N CmdNext.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Next.png"))); // NOI18N CmdNext.setText("Next"); CmdNext.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CmdNextActionPerformed(evt); } }); getContentPane().add(CmdNext, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 650, -1, -1)); CmdSbt.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N CmdSbt.setIcon(new javax.swing.ImageIcon(getClass().getResource("/save.png"))); // NOI18N CmdSbt.setText("Submit"); CmdSbt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CmdSbtActionPerformed(evt); } }); getContentPane().add(CmdSbt, new org.netbeans.lib.awtextra.AbsoluteConstraints(1220, 660, -1, -1)); jLabel21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pages background student.jpg"))); // NOI18N getContentPane().add(jLabel21, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1370, -1)); pack(); }// </editor-fold> private void CmdNextActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: answerCheck();
  • 60. 60 question(); } private void CmdSbtActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: int a=JOptionPane.showConfirmDialog(this,"Do you really want to submit","select",JOptionPane.YES_NO_OPTION); if(a==0) { answerCheck(); submit(); } } private void rb1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: if(rb1.isSelected()) { rb2.setSelected(false); rb3.setSelected(false); rb4.setSelected(false); } } private void rb2ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: if(rb2.isSelected()) { rb1.setSelected(false); rb3.setSelected(false); rb4.setSelected(false); } } private void rb3ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: if(rb3.isSelected()) { rb1.setSelected(false); rb2.setSelected(false); rb4.setSelected(false); } }
  • 61. 61 private void rb4ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: if(rb4.isSelected()) { rb2.setSelected(false); rb3.setSelected(false); rb1.setSelected(false); } } /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(QuizExam.class.getName()).log(java.util.logging.Level.SEVE RE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(QuizExam.class.getName()).log(java.util.logging.Level.SEVE RE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(QuizExam.class.getName()).log(java.util.logging.Level.SEVE RE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(QuizExam.class.getName()).log(java.util.logging.Level.SEVE RE, null, ex); } //</editor-fold>
  • 62. 62 /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new QuizExam().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JButton CmdNext; private javax.swing.JButton CmdSbt; private javax.swing.JLabel dt; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel12; private javax.swing.JLabel jLabel13; private javax.swing.JLabel jLabel14; private javax.swing.JLabel jLabel17; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel21; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JSeparator jSeparator1; private javax.swing.JLabel mk; private javax.swing.JLabel mn; private javax.swing.JLabel nm; private javax.swing.JLabel qd; private javax.swing.JLabel qn; private javax.swing.JRadioButton rb1; private javax.swing.JRadioButton rb2; private javax.swing.JRadioButton rb3; private javax.swing.JRadioButton rb4; private javax.swing.JLabel rbl; private javax.swing.JLabel sc; private javax.swing.JLabel sc1; // End of variables declaration } /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */
  • 63. 63 package quiz; /** * * @author HP-PC */ public class Submit extends javax.swing.JFrame { /** * Creates new form Submit */ public Submit() { initComponents(); } public Submit(String marks1) { initComponents(); //int i=2; String marks="Marks Obtained :"+marks1; //int i=Integer.parseInt(marks); //i=i-2; rsl.setText(marks); } Submit(int marks1) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); rsl = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); rsl1 = new javax.swing.JLabel(); rsl2 = new javax.swing.JLabel(); rsl3 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel();
  • 64. 64 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/quiz/Close.png"))); // NOI18N getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(1306, 0, -1, -1)); jLabel2.setFont(new java.awt.Font("Verdana", 1, 60)); // NOI18N jLabel2.setText("Sucessfully Updated"); getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(384, 374, 714, 120)); rsl.setFont(new java.awt.Font("Verdana", 1, 60)); // NOI18N rsl.setText("Marks Obtained: "); getContentPane().add(rsl, new org.netbeans.lib.awtextra.AbsoluteConstraints(383, 252, 720, 120)); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/quiz/Close.png"))); // NOI18N jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(1163, 0, 70, 60)); rsl1.setFont(new java.awt.Font("Verdana", 1, 60)); // NOI18N rsl1.setText("Marks Obtained: "); getContentPane().add(rsl1, new org.netbeans.lib.awtextra.AbsoluteConstraints(383, 252, 590, 120)); rsl2.setFont(new java.awt.Font("Verdana", 1, 60)); // NOI18N rsl2.setText("Marks Obtained: "); getContentPane().add(rsl2, new org.netbeans.lib.awtextra.AbsoluteConstraints(383, 252, 590, 120)); rsl3.setFont(new java.awt.Font("Verdana", 1, 60)); // NOI18N rsl3.setText("Marks Obtained: "); getContentPane().add(rsl3, new org.netbeans.lib.awtextra.AbsoluteConstraints(383, 252, 590, 120)); jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/quiz/pages background student.jpg"))); // NOI18N getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1230, 600));
  • 65. 65 pack(); setLocationRelativeTo(null); }// </editor-fold> private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: setVisible(false); } /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Submit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Submit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Submit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Submit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() {
  • 66. 66 new Submit().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel rsl; private javax.swing.JLabel rsl1; private javax.swing.JLabel rsl2; private javax.swing.JLabel rsl3; // End of variables declaration } Admin Login /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package quiz; import javax.swing.*; /** * * @author HP-PC */ public class AdminHome extends javax.swing.JFrame { public static int open=0; /** * Creates new form AdminHome */ public AdminHome() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor.
  • 67. 67 */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); jMenuBar1 = new javax.swing.JMenuBar(); Addnewquest = new javax.swing.JMenu(); Updateques = new javax.swing.JMenu(); Allques = new javax.swing.JMenu(); Delete = new javax.swing.JMenu(); res = new javax.swing.JMenu(); MenuLg = new javax.swing.JMenu(); MenuExt = new javax.swing.JMenu(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setUndecorated(true); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/index background.png"))); // NOI18N getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -120, -1, 770)); jMenuBar1.setBackground(new java.awt.Color(255, 0, 51)); jMenuBar1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Navigation Bar", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 36), new java.awt.Color(255, 0, 0))); // NOI18N Addnewquest.setIcon(new javax.swing.ImageIcon(getClass().getResource("/add new question.png"))); // NOI18N Addnewquest.setText("Add New Question"); Addnewquest.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N Addnewquest.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { AddnewquestMouseClicked(evt); } }); jMenuBar1.add(Addnewquest); Updateques.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Update Question.png"))); // NOI18N Updateques.setText("Update Questiion"); Updateques.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N Updateques.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { UpdatequesMouseClicked(evt);
  • 68. 68 } }); jMenuBar1.add(Updateques); Allques.setIcon(new javax.swing.ImageIcon(getClass().getResource("/all questions.png"))); // NOI18N Allques.setText("All Question"); Allques.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N Allques.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { AllquesMouseClicked(evt); } }); jMenuBar1.add(Allques); Delete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/delete Question.png"))); // NOI18N Delete.setText("Delete Question"); Delete.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N Delete.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { DeleteMouseClicked(evt); } }); jMenuBar1.add(Delete); res.setIcon(new javax.swing.ImageIcon(getClass().getResource("/quiz/all student result.png"))); // NOI18N res.setText("All Student Result"); res.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N res.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { resMouseClicked(evt); } }); jMenuBar1.add(res); MenuLg.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Logout.png"))); // NOI18N MenuLg.setText("Log Out"); MenuLg.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N MenuLg.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { MenuLgMouseClicked(evt); } }); MenuLg.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) {
  • 69. 69 MenuLgActionPerformed(evt); } }); jMenuBar1.add(MenuLg); MenuExt.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); // NOI18N MenuExt.setText("Exit"); MenuExt.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N MenuExt.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { MenuExtMouseClicked(evt); } }); MenuExt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { MenuExtActionPerformed(evt); } }); jMenuBar1.add(MenuExt); setJMenuBar(jMenuBar1); pack(); setLocationRelativeTo(null); }// </editor-fold> private void MenuLgMouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: JFrame jf=new JFrame(); jf.setAlwaysOnTop(true); int a=JOptionPane.showConfirmDialog(jf,"Do you want to Logout","Select",JOptionPane.YES_NO_OPTION); if(a==0) { this.setVisible(false); new LoginAdmin().setVisible(true); } } private void MenuExtMouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: JFrame jf=new JFrame(); jf.setAlwaysOnTop(true); int a=JOptionPane.showConfirmDialog(jf,"Do you want to Exit","Select",JOptionPane.YES_NO_OPTION); if(a==0) {
  • 70. 70 System.exit(0); } } private void AddnewquestMouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: if(open==0) { new AddNewQues().setVisible(true); open=1; } else { JFrame jf=new JFrame(); jf.setAlwaysOnTop(true); JOptionPane.showMessageDialog(jf,"one form already open"); } } private void UpdatequesMouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: if(open==0) { new UpdateQues().setVisible(true); open=1; } else { JFrame jf=new JFrame(); jf.setAlwaysOnTop(true); JOptionPane.showMessageDialog(jf,"one form already open"); } } private void AllquesMouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: if(open==0) { new AllQues().setVisible(true); open=1; } else { JFrame jf=new JFrame();
  • 71. 71 jf.setAlwaysOnTop(true); JOptionPane.showMessageDialog(jf,"one form already open"); } } private void DeleteMouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: if(open==0) { new Delete().setVisible(true); open=1; } else { JFrame jf=new JFrame(); jf.setAlwaysOnTop(true); JOptionPane.showMessageDialog(jf,"one form already open"); } } private void MenuExtActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } private void MenuLgActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } private void resMouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: if(open==0) { new result().setVisible(true); open=1; } else { JFrame jf=new JFrame(); jf.setAlwaysOnTop(true); JOptionPane.showMessageDialog(jf,"one form already open"); } } /** * @param args the command line arguments
  • 72. 72 */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(AdminHome.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(AdminHome.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(AdminHome.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(AdminHome.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new AdminHome().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JMenu Addnewquest; private javax.swing.JMenu Allques; private javax.swing.JMenu Delete; private javax.swing.JMenu MenuExt; private javax.swing.JMenu MenuLg;
  • 73. 73 private javax.swing.JMenu Updateques; private javax.swing.JLabel jLabel1; private javax.swing.JMenuBar jMenuBar1; private javax.swing.JMenu res; // End of variables declaration } Add Question /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package quiz; import javax.swing.*; import java.sql.*; import Project.ConnectionProvider; /** * * @author HP-PC */ public class AddNewQues extends javax.swing.JFrame { /** * Creates new form AddNewQues */ public AddNewQues() { initComponents(); try{ Connection con=ConnectionProvider.getCon(); Statement stmt=con.createStatement(); ResultSet rs=stmt.executeQuery("select count(Id)from question"); if(rs.first()) { int id=rs.getInt(1); id=id+1; String str=String.valueOf(id); idlbl.setText(str); } else { idlbl.setText("1"); } }
  • 74. 74 catch(Exception ex) { JFrame jf=new JFrame(); jf.setAlwaysOnTop(true); JOptionPane.showMessageDialog(jf,ex); } } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); CmdClose = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); idlbl = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); qtf = new javax.swing.JTextField(); ootf = new javax.swing.JTextField(); totf = new javax.swing.JTextField(); ttotf = new javax.swing.JTextField(); fotf = new javax.swing.JTextField(); atf = new javax.swing.JTextField(); jLabel11 = new javax.swing.JLabel(); CmdSave = new javax.swing.JButton(); CmdClear = new javax.swing.JButton(); jLabel12 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setAlwaysOnTop(true); setUndecorated(true); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/add new question.png"))); // NOI18N getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, 64));
  • 75. 75 jLabel2.setFont(new java.awt.Font("Algerian", 1, 48)); // NOI18N jLabel2.setText("Add New Question"); getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(67, 0, 734, -1)); CmdClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); // NOI18N CmdClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CmdCloseActionPerformed(evt); } }); getContentPane().add(CmdClose, new org.netbeans.lib.awtextra.AbsoluteConstraints(990, 0, 80, 80)); getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 77, 1066, 10)); idlbl.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N idlbl.setForeground(new java.awt.Color(255, 0, 0)); idlbl.setText("00"); getContentPane().add(idlbl, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 110, 148, -1)); jLabel5.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel5.setText(" Option 1:"); getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(35, 196, 117, -1)); jLabel6.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel6.setText("Question :"); getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(41, 148, 117, -1)); jLabel7.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel7.setText(" Option 2:"); getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(35, 229, -1, -1)); jLabel8.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel8.setText(" Option 3:"); getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(35, 268, -1, -1)); jLabel9.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel9.setText(" Option 4:"); getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(35, 307, -1, -1));
  • 76. 76 jLabel10.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel10.setText("Answer :"); getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(41, 342, 105, 34)); qtf.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N getContentPane().add(qtf, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 145, 660, 33)); ootf.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N getContentPane().add(ootf, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 196, 660, -1)); totf.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N getContentPane().add(totf, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 231, 660, 30)); ttotf.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N getContentPane().add(ttotf, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 268, 660, -1)); fotf.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N getContentPane().add(fotf, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 307, 660, -1)); atf.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N getContentPane().add(atf, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 342, 660, 34)); jLabel11.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel11.setText("Question Id:"); getContentPane().add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(41, 112, 148, -1)); CmdSave.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N CmdSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/save.png"))); // NOI18N CmdSave.setText("Save"); CmdSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CmdSaveActionPerformed(evt); } }); getContentPane().add(CmdSave, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 418, -1, -1)); CmdClear.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
  • 77. 77 CmdClear.setIcon(new javax.swing.ImageIcon(getClass().getResource("/clear.png"))); // NOI18N CmdClear.setText("Clear"); CmdClear.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CmdClearActionPerformed(evt); } }); getContentPane().add(CmdClear, new org.netbeans.lib.awtextra.AbsoluteConstraints(419, 418, -1, -1)); jLabel12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pages background admin.jpg"))); // NOI18N getContentPane().add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(-2, -6, -1, 540)); pack(); setLocationRelativeTo(null); }// </editor-fold> private void CmdSaveActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: String id= idlbl.getText(); String q= qtf.getText(); String o1= ootf.getText(); String o2= totf.getText(); String o3= ttotf.getText(); String o4=fotf.getText(); String a=atf.getText(); try{ Connection con=ConnectionProvider.getCon(); PreparedStatement ps=con.prepareStatement("insert into question values(?,?,?,?,?,?,? )"); ps.setString(1, id); ps.setString(2, q); ps.setString(3, o1); ps.setString(4, o2); ps.setString(5, o3); ps.setString(6, o4); ps.setString(7, a); ps.executeUpdate(); JFrame jf=new JFrame(); jf.setAlwaysOnTop(true); JOptionPane.showMessageDialog(jf,"Succefully Update"); setVisible(false); new AddNewQues().setVisible(true); } catch(Exception ex)
  • 78. 78 { JFrame jf=new JFrame(); jf.setAlwaysOnTop(true); JOptionPane.showMessageDialog(jf,ex); } } private void CmdClearActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: qtf.setText(""); ootf.setText(""); totf.setText(""); ttotf.setText(""); fotf.setText(""); atf.setText(""); } private void CmdCloseActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: AdminHome.open=0; setVisible(false); } /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(AddNewQues.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (InstantiationException ex) {
  • 79. 79 java.util.logging.Logger.getLogger(AddNewQues.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(AddNewQues.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(AddNewQues.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new AddNewQues().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JButton CmdClear; private javax.swing.JButton CmdClose; private javax.swing.JButton CmdSave; private javax.swing.JTextField atf; private javax.swing.JTextField fotf; private javax.swing.JLabel idlbl; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel12; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JLabel jLabel9; private javax.swing.JSeparator jSeparator1; private javax.swing.JTextField ootf; private javax.swing.JTextField qtf; private javax.swing.JTextField totf; private javax.swing.JTextField ttotf; // End of variables declaration } Update Question
  • 80. 80 /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package quiz; import java.sql.*; import Project.ConnectionProvider; import javax.swing.JFrame; import javax.swing.JOptionPane; /** * * @author HP-PC */ public class UpdateQues extends javax.swing.JFrame { /** * Creates new form UpdateQues */ public UpdateQues() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); CmdClose = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); jLabel3 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); itf = new javax.swing.JTextField(); qtf = new javax.swing.JTextField(); ootf = new javax.swing.JTextField(); totf = new javax.swing.JTextField(); ttotf = new javax.swing.JTextField(); fotf = new javax.swing.JTextField(); atf = new javax.swing.JTextField(); CmdSearch = new javax.swing.JButton();
  • 81. 81 CmdUpdate = new javax.swing.JButton(); CmdClear = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setAlwaysOnTop(true); setUndecorated(true); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Update Question.png"))); // NOI18N getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 52, 69)); jLabel2.setFont(new java.awt.Font("Algerian", 1, 48)); // NOI18N jLabel2.setText("Update Question"); getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(59, 0, 479, 69)); CmdClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); // NOI18N CmdClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CmdCloseActionPerformed(evt); } }); getContentPane().add(CmdClose, new org.netbeans.lib.awtextra.AbsoluteConstraints(1000, 0, 60, -1)); getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 76, 1065, 10)); jLabel3.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel3.setText("Question Id :"); getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 90, 155, -1)); jLabel5.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel5.setText("Question :"); getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 130, 145, -1)); jLabel6.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel6.setText("Option 1:"); getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 180, 136, -1)); jLabel7.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel7.setText("Option 2:"); getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 220, 116, -1)); jLabel8.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel8.setText("Option 3:"); getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 260, -1, -1)); jLabel9.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N jLabel9.setText("Option 4:"); getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 300, -1, -1)); jLabel10.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N