Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
11 views

Principles of Programming Assignment

This document is an individual report for an assignment on creating an extra-curricular event management system. It includes an introduction to the project, a description of the task which is to create a GUI application to manage student events, a project plan, designs and diagrams of the GUI, and sections on requirements, testing, reflection and conclusion.

Uploaded by

mimonakarki7
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Principles of Programming Assignment

This document is an individual report for an assignment on creating an extra-curricular event management system. It includes an introduction to the project, a description of the task which is to create a GUI application to manage student events, a project plan, designs and diagrams of the GUI, and sections on requirements, testing, reflection and conclusion.

Uploaded by

mimonakarki7
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

ASSIGNMENT TOP SHEET

Faculty of Creative Arts, Technologies &Sciences

Unit Code: CIS096-1


Unit Name: Principles of Programming and Data Structures
Student ID: 1916977
Student Name: Gaurav Deol
Unit Team: Ingo Frommholz, Sue Brandreth
Assignment Details: Assignment 2 – Individual Assignment
(Extra-Curricular Events Management System)
Table of Contents Page No.
1. Introduction…………………………………………………………………………………………1
2. Task Description…………………………………………………………………………………..1
3. Project Plan/Schedule………………………………………………………………………….3
4. Design and diagrams……………………………………………………………………………4
5. Requirements Analysis and Implementation……………………………………….6
6. Testing…………………………………………………………………………………………………9
7. Reflection…………………………………………………………………………..……………….12
8. Conclusion………………………………………………………………………………………….13
9. Appendix…………………………………………………………………………………………….13
Individual Report

1.0 Introduction
When I heard about this project, I was horrified, how I would do coding, complete my GUI alone,
connect database and so many things which is common because I have come from biology field
and everything is new here for me. I selected this assignment as individual because I wanted to
know my capacity and at some point we all must be self-dependent. I am doing this project i.e.
extra-curricular event management system because it will obviously enhance my coding skills in
java. Though I know basics of Java but still I should practically see the things working. I must see
how it runs, I want to develop my habit of doing project because at last we will do project in
future. I am not only wanting to pass, in fact I also want to explore the things. I want to give my
best though I know I won't get good marks due to my insufficient programming skills. Still I
worked so hard.
Basically in this project, I was asked to create a java desktop application in order to manage all
the student-oriented activities at university. This Extra-Curricular Event Management System
project is one of the important projects in our college journey. This project has aimed to engage
everyone to improve their programming skills. So, I just chose it as individual and then selected
subtask 2 since, we don't need any interaction with database or file system and my SQL skills and
database knowledge is so poor. I created login page, downloaded window builder, created
registration page and then started searching tutorials. It took me about 2 weeks only to create
login page. It was easy but at first I was so confused. After some time, I became used to with the
GUI. I linked the different classes in GUI. I read the assignment many times. I observed the use
cases and started making plans. I was not so much successful at all. I faced many problems, you
can say infinite problems. All the tutorials were like tutorial purgatory for me. So, I faced many
problems and I was successful in achieving the goals only after taking long time.
Talking directly, it was a cool project in my view. It helped in my coding skills and I worked with
full dedication, faced many problems, knew my weaknesses and strengths and learnt lessons.

2.0 Task Description


Besides teaching and learning process in university and campus, there are also student-oriented
activities called as extra-curricular activities. These kinds of activities are managed and supervised
by students groups. These activities consists of hacking sessions, religious events, gatherings,
donations, travelling, seminars, talks on advanced fields of study, discussing new technologies,
playing games. These stated things may take place physically or virtually (online) depending on
the situation. These activities are generally not interfered by tutors or any staffs from the
university. The one and only group managing such things are students. Keeping this in mind, we
have to create a Java desktop application.
The application to manage the events should cover details like:
1. Type of event (physical or online)
2. URL if it's online event
3. Location if it's physical (address or room number is required)
4. Event date and time (repeat events possible)
5. Event's title and description
6. Place limitations
Students must register to log in. Thus they can book or post events (depending on the permission
the have got). In order to register, ID, password and details like email, contact number should be
given. After registering, one should log in into the system.
Students can book events if they want to participate. Event is booked message need to be shown
on booking successfully. They can cancel booking and view their bookings. Event organizers or
registered students can post events. While posting, they must give event details and they can
cancel events, change any details in the events and get a list of their events. If he/she cancels the
event, the related bookings done should also be deleted automatically. Now comes the admin.
He/she can provide student with organizing rights i.e. make him the organizer or get the rights
back again i.e. revoke the rights. Admin can too cancel events or bookings.

Actually, the main theme is to create a GUI application to fulfill all the needs. A database is
required or file based storage is required but I didn't use it because I chose different subtask.

Since I chose it as individual assessment so, the whole contribution will be from my side. I don't
have to implement the whole system actually. I was asked to choose one subtask from three.
First subtask was related with JDBC without GUI. Subtask 2 was easy and I chose it. It was a mock-
up of GUI for one case: either student use case plus sign in or event organizer plus sign in or
admin use case plus sign in. I chose student use case plus sign in. I have very poor knowledge of
database so luckily subtask 2 was there for me. If talking in detail, all I have to do is create a GUI
for searching and booking event and cancel it. After showing list of events in one window, user
can book the event. Booked event should not be stored since there's no database. But after
pressing button of booking, a new user interface should pop up displaying GUI that allows user
to book event. A button should be available for confirming the booking and it should show
confirmation message. User should also be able to view their own bookings and there's no
database so as advised by tutors and according to assignment brief, a hard coded or dummy data
was to be made. The data should be permanent or in other word, we can change it only after
changing the program itself since there's no database. In the section of view bookings, the user
should also be able to cancel the event. GUI should be there for cancelling event with an "Are
you sure?" dialogue and a corresponding confirmation message.
Subtask 3 was choosing two use cases among three and use it through a GUI plus database. So,
this is the whole description of the task.
In summary, the first view should be a welcome window with the opportunity to log in. There
also should be a link for new users to register.

3.0 Project Plan


As this is so tough time due to the pandemic going on right now so, I didn't get better time to
manage my project. This is because the classes were online and I had some internet problems. I
actually found it very harder to learn anything online. Due to issues in regular classes, and due to
my regular absence it was hard for me to discuss with my tutors. However, I contacted my tutor
via social media. To be honest, this semester was like a disaster in my life.

However, my simple planning was to make a login page first and a register page linked with the
login page in case the user don't have an account. It took me 2 weeks for making login page and
a half week to create a register page. I lost hope but assignment deadline was shifted. Then, I
decided to create a home page after user logged in. It took me about 3 days. It was quite easy
actually. After that, I made a search event GUI which was the hardest part since I have to include
other events in it and many buttons must be included there. I accomplished it within 1 and half
week. Again, the deadline of submission was shifted. It became easy for me. I took rest and
started watching GUI tutorials. I watched tutorials recommended by the Breo and my tutors. I
asked my friends about buttons and designing the login page via social media. After 1 week, I
started making GUI for each of the events thinking that it would be easy for the user. After 2
weeks, I completed remaining things like linking the classes with login page, going back to login
page button, including some photos to the labels.
Honestly speaking, due to the disaster on going right now made it harder for me to plan my
project. I found that there's a vast difference between online classes and physical classes in the
college. Studying online is too tough. If we contact tutors physically, it's easy. It's because I had
not the habit of reading online. Thus, the planning of project was not so effective in my view.
4.0 Designs and diagrams
First of all, I just tried to understand how a java desktop application looks like and how it is
developed and finally I started designing the GUI as per the requirements.

Fig.1 Login Page

This is the welcome window where you can log in with student id and password. Register option
is also there in case user is not registered. User can close this window as well. After this I made
home page which I think was quite easy.

Fig.2 Home Page


I just placed search events button to list the events, and my bookings button to see the booked
events and finally made logout button which actually take you to the login page again in spite of
disposing all the window. My friend recommended to close all the window if logout button
pressed but I thought of face book app that takes you to the login window after you logout.

Fig.3 Search Events Page


This GUI shows you the upcoming events where you can enter and book events. The events
obviously cannot be updated or deleted since there's no database connection.

Fig.4 My Bookings
This GUI lists you the events that you booked. You can cancel the event from here and this is a
hard coded or dummy type of data so, this only changes if programmer changes the programs.
The figure below shows you the registration form if you don't have an account and it's linked with
the login page as seen in above, there's a register button. I found a big problem here that I will
discuss below.
Fig.5 Registration Form
There are many details that user should give in order to log in and user should remember the ID
and password. After successful login, this will get disposed and the same login page is shown
again. So, these were the diagrams and designs explained a little. I may change the colors and
other small things so the same diagrams might not be found in actual desktop application.

5.0 Requirements Analysis and Implementation


Requirements were to create a java desktop application and the requirements were not so
harder. Requirements were quite little for individual. I myself didn't find me successful to fulfill
these requirements because I know it's not so good GUI that I made. It's quite normal type GUI.
Talking about implementation, I created login page first by watching tutorial video. I used Eclipse
as an Integrated Development Environment because I am used to with it. Speaking about my
application, at first, this is solely based on student use case where no admin and no event
organizer can log in. Only registered and unregistered can come here. After running my program,
a welcome window opens up and you have to log in into the system with ID and password or you
can register there. A home page then arises, where search events, my bookings and logout
options are available. Pressing search button, you will reach to upcoming events and you can
enter inside the events and find the necessary details like event title, event id, time, date,
location, type of event, URL of event if it's online, organization that launched events, description,
address and many more as per the requirements. You can book the event there but cannot cancel
the event in that window. After pressing book button, an "Are you sure?' dialog arises to confirm
the booking. If user presses yes, then a message dialog will show up saying "Event is booked, you
will be informed via mail". Thus I asked for email in register section.
After this, there's a "my booking" button to show the booked events to the user. It's actually not
that much dynamic because it's dummy data. You can cancel the events from there and an "Are
you sure?" option arises and after successful cancelling, a message will be shown saying- "You
cancelled the booking for xxx event". This is my application. I downloaded window builder and
used swing designer. I created it using eclipse where I made login class, register class, search
events class, etc. I didn't use database as per the requirements. There's zero percentage of
database used. Everything is GUI and no any data storing place available. After making classes I
linked them. I changed the main method and made it NewScreen44( ), NewScreen1( ),
NewScreen2( ) and so on for all the classes except login class since it was showing error stating
"No main method found in login class". I thought it must require main method and I can't change
it.

After that, I linked register class to the register button by the code below:
Register HomePage44 = new Register();
HomePage44.NewScreen44();

NewScreen44() was the main method in register class and the above code was in the action
performed of register button in the login page.
By similar way, I linked login2 class (Homepage class) with login button after it showed a message
"You are successfully logged in". After log in, I didn't dispose the login page and it was running in
background after login and user go into home page. This is because I wanted to resume login
page if user presses logout button present in homepage window by coding dispose action in
logout button. I am still confused that I did it right or wrong. I created "My Bookings" class where
I showed the booked events. I didn't use j table there. I used label because I found j table a bit
complicated. It was not showing the heading. But after watching video, I fixed it and still didn't
use it since it was not looking good in the interface. I used "Cancel event" button for each event
and just showed the message- "Booking cancelled for xxx event". I showed event title and event
id in my bookings.
Talking about register page, I created it normally using text field and password field. I asked for
details of user to register. I used close button to show the login page again. I faced a big problem
here and the same problem arises for login page. The problem is it was showing registration
successful even if everything is empty and something is missing. Similarly, in login page, the case
was same. Login was successful even if password is missing. I then asked my friends and watched
videos. I found that I can fix it by using if else statement. If the field example email field is empty
then show message "Email cannot be empty". I used in this way but still got problem that
registration and login was successful even if one thing is missing. I detected the mistake myself.
At first I was using if, if, if, if, if, and else statement and then I changed it to if, else if, else if, else
if, else if…… and else statement. The updated code is below:

String Fname=FirstName.getText();
String Lname=LastName.getText();
String email=Email.getText();
String contact=Contact.getText();
String studentid=Studentid.getText();
String Password=password.getText();

if (Fname.equals("")) {
JOptionPane.showMessageDialog(null,"First Name
cannot be empty !");
}

else if (Lname.equals("")) {
JOptionPane.showMessageDialog(null,"Last Name cannot
be empty !");
}

else if (email.equals("")) {
JOptionPane.showMessageDialog(null,"You must enter
your E-mail !");
}

else if (contact.equals("")) {
JOptionPane.showMessageDialog(null,"Contact Number
cannot be empty !");
}

else if (studentid.equals("")) {
JOptionPane.showMessageDialog(null,"Student ID
cannot be empty !");
}

else if (Password.equals("")) {
JOptionPane.showMessageDialog(null,"Please enter
your password !");
}

else {
JOptionPane.showMessageDialog(null,"Registration
Successful ! You can login now !");
frame.dispose();
}
}

I applied same for login page.


String Studentidentity=Stid.getText();
String Password=Pwd.getText();

if (Studentidentity.equals("")) {
JOptionPane.showMessageDialog(null,"Student ID cannot be empty !"); }

else if (Password.equals("")) {
JOptionPane.showMessageDialog(null,"Password cannot
be empty !");
}

else { JOptionPane.showMessageDialog(null,"You are


successfully logged in !");
}

Search events class was easy to make. I listed the events there like: Christmas, blood donation,
etc. and one problem I faced was to use best suited background photo. At first there was a normal
color background but I thought of making it cool so I used label and pressed at icon and put the
jpg image in the label after copying image to image source folder. This was a little problem but it
developed my GUI skills.
After that in interface of each event, I gave all the details of event and put a book event button.
After pressing it, "Are you sure?" message comes and then after booking, message of event is
booked comes. After uploading this assignment, I will still work on it using database and I will
make it more dynamic. What I have did is not satisfying me. I should have used database but it's
okay for now.
Talking about novel approaches, actually I didn't use any new approaches to meet up the
requirements since everything here for me is new. I am just in the learning phase. I might use
new approaches next time.

6.0 Testing

Fig.6 Successful Login


After this, user will be taken to home page as below:
Fig.7 Homepage after successful login
After this, user can select any event and then book that event after reading event details.

Fig.8 Successful Booking


User can register after clicking on register button and after successful registration, it takes user
again into login page.

Fig.9 Successful Registration


User can go to my bookings and can cancel event there. There's no cancel option in search events.

Fig.10 Successfully Cancelling Event

I got the expected result everywhere. Only as stated above in implementation, I was confused
with if else statements.
7.0 Reflection
Doing this project, I found my strength that I can tackle problem keeping patience. I can also do
projects alone. My strength is that I can manage time. I managed time to complete this. I
allocated particular time for particular interfaces. Watching videos and asking friends and tutors
is my another strength. My weakness is that I am very bad at coding. Since, I came from biology
field, I am here at learning phase, I don’t have a foundation of computers and software,
everything is new here. I consider poor knowledge in database as my other weakness though I
didn't use it here but I could have chosen another subtask and use database to make my project
more dynamic.
Now coming on my achievement, I don't think I have achieved all the required specifications. Due
to my insufficient knowledge in coding and GUI, I always feel that something is missing and I
won't get good marks. I hope in coming days, I would do better, I would use database and learn
it properly.
I gave maximum time to accomplish this project. I not only did it but I have used my optimum
time watching the tutorials on GUI , tutorials on downloading window builder, asked my tutors,
friends and so on. After doing so much hard work, I have completed it. It was not harder than I
expected actually. I think, I have accomplished it means that anyone can do it. As stated earlier,
I was super horrified about it but there was no database used so, I was happy. I thought it would
be so much harder since it is second semester, but I found it as an easy project. Subtask 2 is very
easy. After tackling this assignment, I got optimum knowledge in basics of GUI in java. I learnt to
be self-independent. I searched many things on internet and got an opportunity to explore new
things.
This work actually enhanced my understanding of Java language. Since, it was totally a GUI so I
don't get much knowledge but I can say that it highly motivated me to learn more java and other
languages. As I said above, I will complete this project again making it dynamic, using database. I
will use confirm password field and show password option and many more. I will learn more java.
In fact I have already got best 3/4 channels on You Tube. I will start following them. I will learn
java, database and python there. I am really motivated by this project. If I had to undertake it
again, I am totally sure that I would accomplish it uniquely. Now I know all the basics of GUI, if
the deadline would have been postponed then I would have used database and round button
options, beautiful designs and many more. I can now do any project like this without watching
videos.
For a future iteration of this project, my improvements would be making round buttons, using
better designs, using database to make it more dynamic, show password option, confirm
password option, animations on background and many more. Even after uploading this
assignment, I will be working on it.
8.0 Conclusion
It was really tough for me but still I blame myself for not giving time to practice coding. I was
asked to create application of event management and I think I have achieved it partially. I am
running my program but without database it feels like a normal type of application. I got the
lesson that I should give more attention to my tutors and search the things on internet and You
Tube immediately. Though I completed my work but I am not getting self-satisfaction.

9.0 Appendix
Codes:
1. Login:
package ia;

import java.awt.EventQueue;

import javax.swing.JFrame;

import javax.swing.JPanel;

import java.awt.Color;

import javax.swing.border.EmptyBorder;

import javax.swing.JTextField;

import java.awt.Font;

import javax.swing.JPasswordField;

import javax.swing.JLabel;

import javax.swing.JOptionPane;

import javax.swing.SwingConstants;

import javax.swing.JButton;

import javax.swing.ImageIcon;

import java.awt.event.ActionListener;

import java.awt.event.MouseAdapter;

import java.awt.event.MouseEvent;

import java.awt.event.ActionEvent;

public class Loggin {


private JFrame frame;

private JTextField Stid;

private JPasswordField Pwd;

/**

* Launch the application.

*/

public static void main(String[] args) {

EventQueue.invokeLater(new Runnable() {

public void run() {

try {

Loggin window = new Loggin();

window.frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace();

});

/**

* Create the application.

*/

public Loggin() {

initialize();

/**

* Initialize the contents of the frame.

*/

private void initialize() {

frame = new JFrame();


frame.setBounds(230,150,900,500);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.getContentPane().setLayout(null);

JPanel contentPane = new JPanel();

contentPane.setLayout(null);

contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));

contentPane.setBackground(new Color(47, 79, 79));

contentPane.setBounds(0, 0, 884, 461);

frame.getContentPane().add(contentPane);

Stid = new JTextField();

Stid.setFont(new Font("Tahoma", Font.PLAIN, 15));

Stid.setColumns(10);

Stid.setBounds(622, 130, 237, 27);

contentPane.add(Stid);

Pwd = new JPasswordField();

Pwd.setFont(new Font("Tahoma", Font.PLAIN, 15));

Pwd.setBounds(622, 193, 237, 27);

contentPane.add(Pwd);

JLabel lblNewLabel = new JLabel("LOGIN");

lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel.setForeground(Color.WHITE);

lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 25));

lblNewLabel.setBounds(647, 73, 183, 37);

contentPane.add(lblNewLabel);

JButton btnNewButton = new JButton("LOGIN");

btnNewButton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent arg0) {


//Message for missing fields while logging into the system

String Studentidentity=Stid.getText();

String Password=Pwd.getText();

if (Studentidentity.equals("")) {

JOptionPane.showMessageDialog(null,"Student ID cannot be empty !");

else if (Password.equals("")) {

JOptionPane.showMessageDialog(null,"Password cannot be empty !");

else { JOptionPane.showMessageDialog(null,"You are successfully logged in !");

Login2 HomePage = new Login2();

HomePage.NewScreen();

});

btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 15));

btnNewButton.setBounds(622, 231, 89, 23);

contentPane.add(btnNewButton);

JButton btnClose = new JButton("CLOSE");


btnClose.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

});

btnClose.addMouseListener(new MouseAdapter() {

@Override

public void mouseClicked(MouseEvent arg0) {

frame.dispose();

});

btnClose.setFont(new Font("Tahoma", Font.PLAIN, 15));

btnClose.setBounds(770, 231, 89, 23);

contentPane.add(btnClose);

JLabel lblNewLabel_2 = new JLabel("New label");

lblNewLabel_2.setIcon(new ImageIcon(Loggin.class.getResource("/party.jpg")));

lblNewLabel_2.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_2.setBounds(10, 73, 509, 300);

contentPane.add(lblNewLabel_2);

JLabel lblNewLabel_3 = new JLabel("COLLEGE EVENT MANAGEMENT SYSTEM");

lblNewLabel_3.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_3.setForeground(Color.WHITE);

lblNewLabel_3.setFont(new Font("Tahoma", Font.PLAIN, 20));

lblNewLabel_3.setBackground(Color.WHITE);

lblNewLabel_3.setBounds(55, 374, 424, 87);

contentPane.add(lblNewLabel_3);

JLabel lblNewLabel_4 = new JLabel("Don't have an account?");


lblNewLabel_4.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_4.setForeground(Color.ORANGE);

lblNewLabel_4.setFont(new Font("Tahoma", Font.PLAIN, 16));

lblNewLabel_4.setBounds(536, 307, 210, 47);

contentPane.add(lblNewLabel_4);

JButton btnNewButton_1 = new JButton("REGISTER");

btnNewButton_1.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

//Linking the register page with register button of login page

Register HomePage44 = new Register();

HomePage44.NewScreen44();

});

btnNewButton_1.setFont(new Font("Tahoma", Font.PLAIN, 15));

btnNewButton_1.setBounds(739, 319, 120, 23);

contentPane.add(btnNewButton_1);

JLabel lblNewLabel_5 = new JLabel("Student ID");

lblNewLabel_5.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_5.setForeground(Color.WHITE);

lblNewLabel_5.setFont(new Font("Tahoma", Font.BOLD, 15));

lblNewLabel_5.setBounds(529, 127, 89, 35);

contentPane.add(lblNewLabel_5);

JLabel lblNewLabel_6 = new JLabel("Password");

lblNewLabel_6.setForeground(Color.WHITE);

lblNewLabel_6.setFont(new Font("Tahoma", Font.BOLD, 16));


lblNewLabel_6.setBounds(536, 191, 82, 30);

contentPane.add(lblNewLabel_6);

JLabel lblNewLabel_1 = new JLabel("WELCOME");

lblNewLabel_1.setForeground(new Color(255, 255, 255));

lblNewLabel_1.setFont(new Font("Tahoma", Font.PLAIN, 25));

lblNewLabel_1.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_1.setBounds(143, 15, 242, 47);

contentPane.add(lblNewLabel_1);

2. Home page (Login2 class):


package ia;

import java.awt.EventQueue;

import javax.swing.JFrame;

import java.awt.Color;

import javax.swing.JButton;

import java.awt.Font;

import javax.swing.JTextPane;

import javax.swing.JTable;

import javax.swing.table.DefaultTableModel;

import javax.swing.JScrollPane;

import java.awt.event.ActionListener;

import java.awt.event.ActionEvent;

import javax.swing.JLabel;

import javax.swing.SwingConstants;

import java.awt.Toolkit;

import javax.swing.ImageIcon;

public class Login2 {


private JFrame frame;

/**

* Launch the application.

*/

public static void NewScreen() {

EventQueue.invokeLater(new Runnable() {

public void run() {

try {

Login2 window = new Login2();

window.frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace();

});

/**

* Create the application.

*/

public Login2() {

initialize();

/**

* Initialize the contents of the frame.

*/

private void initialize() {

frame = new JFrame();


frame.setIconImage(Toolkit.getDefaultToolkit().getImage(Login2.class.getResource("/javax/swing/plaf/basic/icons/Ja
vaCup16.png")));

frame.getContentPane().setBackground(Color.BLACK);

frame.getContentPane().setForeground(Color.WHITE);

frame.getContentPane().setLayout(null);

JButton btnNewButton = new JButton("Log Out");

btnNewButton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

frame.dispose();

});

btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 14));

btnNewButton.setBounds(355, 275, 167, 32);

frame.getContentPane().add(btnNewButton);

JButton btnNewButton_1 = new JButton("Search Events");

btnNewButton_1.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent arg0) {

SearchEvents HomePage2= new SearchEvents();

HomePage2.NewScreen2();

});

btnNewButton_1.setFont(new Font("Tahoma", Font.PLAIN, 14));

btnNewButton_1.setBounds(355, 102, 167, 32);

frame.getContentPane().add(btnNewButton_1);

JButton btnNewButton_2 = new JButton("My Bookings");

btnNewButton_2.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent arg0) {


Mybookings HomePage3=new Mybookings(); //Linking My bookings with home page
"My booking" button

HomePage3.NewScreen3();

});

btnNewButton_2.setFont(new Font("Tahoma", Font.PLAIN, 14));

btnNewButton_2.setBounds(355, 194, 167, 32);

frame.getContentPane().add(btnNewButton_2);

JLabel lblNewLabel = new JLabel("Home Page");

lblNewLabel.setForeground(Color.WHITE);

lblNewLabel.setBackground(new Color(240, 240, 240));

lblNewLabel.setFont(new Font("Sylfaen", Font.PLAIN, 30));

lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel.setBounds(340, 4, 204, 32);

frame.getContentPane().add(lblNewLabel);

JLabel lblNewLabel_1 = new JLabel("");

lblNewLabel_1.setIcon(new ImageIcon(Login2.class.getResource("/abcd.jpg")));

lblNewLabel_1.setBounds(33, 45, 809, 424);

frame.getContentPane().add(lblNewLabel_1);

frame.setBounds(230,150,900,550);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

3. Register:
package ia;

import java.awt.EventQueue;

import javax.swing.JFrame;
import java.awt.Color;

import javax.swing.JLabel;

import javax.swing.JOptionPane;

import javax.swing.SwingConstants;

import java.awt.Font;

import javax.swing.JTextField;

import javax.swing.JPasswordField;

import javax.swing.JButton;

import java.awt.event.ActionListener;

import java.awt.event.ActionEvent;

public class Register {

private JFrame frame;

private JTextField FirstName;

private JTextField LastName;

private JTextField Email;

private JTextField Contact;

private JTextField Studentid;

private JPasswordField password;

/**

* Launch the application.

*/

public static void NewScreen44() {

EventQueue.invokeLater(new Runnable() {

public void run() {

try {

Register window = new Register();

window.frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace();

}
}

});

/**

* Create the application.

*/

public Register() {

initialize();

/**

* Initialize the contents of the frame.

*/

private void initialize() {

frame = new JFrame();

frame.getContentPane().setBackground(new Color(127, 255, 212));

frame.setBounds(430, 130, 550, 500);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.getContentPane().setLayout(null);

JLabel lblNewLabel = new JLabel("First Name ");

lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 15));

lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel.setBounds(21, 59, 104, 31);

frame.getContentPane().add(lblNewLabel);

JLabel lblNewLabel_1 = new JLabel("Registration ");

lblNewLabel_1.setFont(new Font("Sylfaen", Font.PLAIN, 22));

lblNewLabel_1.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_1.setBounds(173, 11, 163, 39);

frame.getContentPane().add(lblNewLabel_1);
JLabel lblLastName = new JLabel("Last Name");

lblLastName.setHorizontalAlignment(SwingConstants.CENTER);

lblLastName.setFont(new Font("Tahoma", Font.PLAIN, 15));

lblLastName.setBounds(10, 101, 115, 31);

frame.getContentPane().add(lblLastName);

JLabel lblEmail = new JLabel("E-mail");

lblEmail.setHorizontalAlignment(SwingConstants.CENTER);

lblEmail.setFont(new Font("Tahoma", Font.PLAIN, 15));

lblEmail.setBounds(10, 143, 86, 31);

frame.getContentPane().add(lblEmail);

JLabel lblContactNo = new JLabel("Contact No.");

lblContactNo.setHorizontalAlignment(SwingConstants.CENTER);

lblContactNo.setFont(new Font("Tahoma", Font.PLAIN, 15));

lblContactNo.setBounds(10, 185, 126, 31);

frame.getContentPane().add(lblContactNo);

JLabel lblNewLabel_5 = new JLabel("Student ID");

lblNewLabel_5.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_5.setFont(new Font("Tahoma", Font.PLAIN, 15));

lblNewLabel_5.setBounds(10, 227, 115, 31);

frame.getContentPane().add(lblNewLabel_5);

JLabel lblPassword = new JLabel("Password");

lblPassword.setHorizontalAlignment(SwingConstants.CENTER);

lblPassword.setFont(new Font("Tahoma", Font.PLAIN, 15));

lblPassword.setBounds(10, 270, 104, 31);

frame.getContentPane().add(lblPassword);

FirstName = new JTextField();

FirstName.setBounds(166, 66, 170, 20);

frame.getContentPane().add(FirstName);
FirstName.setColumns(10);

LastName = new JTextField();

LastName.setColumns(10);

LastName.setBounds(166, 108, 170, 20);

frame.getContentPane().add(LastName);

Email = new JTextField();

Email.setColumns(10);

Email.setBounds(166, 150, 214, 20);

frame.getContentPane().add(Email);

Contact = new JTextField();

Contact.setColumns(10);

Contact.setBounds(166, 192, 170, 20);

frame.getContentPane().add(Contact);

Studentid = new JTextField();

Studentid.setColumns(10);

Studentid.setBounds(166, 234, 170, 20);

frame.getContentPane().add(Studentid);

password = new JPasswordField();

password.setBounds(166, 277, 170, 20);

frame.getContentPane().add(password);

JButton btnNewButton = new JButton("REGISTER");

btnNewButton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent arg0) {

String Fname=FirstName.getText();

String Lname=LastName.getText();

String email=Email.getText();

String contact=Contact.getText();
String studentid=Studentid.getText();

String Password=password.getText();

//Message for missing fields while registering

if (Fname.equals("")) {

JOptionPane.showMessageDialog(null,"First Name cannot be empty !");

else if (Lname.equals("")) {

JOptionPane.showMessageDialog(null,"Last Name cannot be empty !");

else if (email.equals("")) {

JOptionPane.showMessageDialog(null,"You must enter your E-mail !");

else if (contact.equals("")) {

JOptionPane.showMessageDialog(null,"Contact Number cannot be empty !");

else if (studentid.equals("")) {

JOptionPane.showMessageDialog(null,"Student ID cannot be empty !");

else if (Password.equals("")) {

JOptionPane.showMessageDialog(null,"Please enter your password !");

else {

JOptionPane.showMessageDialog(null,"Registration Successful ! You can login


now !");
frame.dispose();

});

btnNewButton.setBounds(193, 351, 126, 31);

frame.getContentPane().add(btnNewButton);

JButton btnNewButton_1 = new JButton("Cancel");

btnNewButton_1.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

frame.dispose();

});

btnNewButton_1.setBounds(209, 427, 89, 23);

frame.getContentPane().add(btnNewButton_1);

4. Mybookings:
package ia;

import java.awt.EventQueue;

import javax.swing.JFrame;

import java.awt.Color;

import javax.swing.JLabel;

import javax.swing.JOptionPane;

import javax.swing.SwingConstants;

import java.awt.Font;
import javax.swing.JTable;

import javax.swing.table.DefaultTableModel;

import javax.swing.ListSelectionModel;

import javax.swing.JScrollPane;

import javax.swing.JButton;

import java.awt.event.ActionListener;

import java.awt.event.ActionEvent;

public class Mybookings {

private JFrame frame;

/**

* Launch the application.

*/

public static void NewScreen3() {

EventQueue.invokeLater(new Runnable() {

public void run() {

try {

Mybookings window = new Mybookings();

window.frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace();

});

/**

* Create the application.

*/

public Mybookings() {

initialize();
}

/**

* Initialize the contents of the frame.

*/

private void initialize() {

frame = new JFrame();

frame.getContentPane().setBackground(new Color(46, 139, 87));

frame.getContentPane().setLayout(null);

JLabel lblNewLabel = new JLabel("My Bookings");

lblNewLabel.setBounds(190, 0, 220, 45);

lblNewLabel.setBackground(new Color(255, 255, 255));

lblNewLabel.setForeground(new Color(255, 255, 255));

lblNewLabel.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 25));

lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);

frame.getContentPane().add(lblNewLabel);

JLabel lblNewLabel_1 = new JLabel("S.No.");

lblNewLabel_1.setForeground(new Color(255, 255, 255));

lblNewLabel_1.setBackground(new Color(255, 255, 255));

lblNewLabel_1.setFont(new Font("Tahoma", Font.BOLD, 18));

lblNewLabel_1.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_1.setBounds(27, 67, 73, 32);

frame.getContentPane().add(lblNewLabel_1);

JLabel lblNewLabel_1_1 = new JLabel("Event Title");

lblNewLabel_1_1.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_1_1.setForeground(Color.WHITE);

lblNewLabel_1_1.setFont(new Font("Tahoma", Font.BOLD, 18));

lblNewLabel_1_1.setBackground(Color.WHITE);

lblNewLabel_1_1.setBounds(115, 67, 107, 32);

frame.getContentPane().add(lblNewLabel_1_1);
JLabel lblNewLabel_1_1_1 = new JLabel("Event ID");

lblNewLabel_1_1_1.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_1_1_1.setForeground(Color.WHITE);

lblNewLabel_1_1_1.setFont(new Font("Tahoma", Font.BOLD, 18));

lblNewLabel_1_1_1.setBackground(Color.WHITE);

lblNewLabel_1_1_1.setBounds(268, 67, 107, 32);

frame.getContentPane().add(lblNewLabel_1_1_1);

JLabel lblNewLabel_1_1_2 = new JLabel("1.");

lblNewLabel_1_1_2.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_1_1_2.setForeground(Color.WHITE);

lblNewLabel_1_1_2.setFont(new Font("Tahoma", Font.PLAIN, 16));

lblNewLabel_1_1_2.setBackground(Color.WHITE);

lblNewLabel_1_1_2.setBounds(10, 110, 107, 32);

frame.getContentPane().add(lblNewLabel_1_1_2);

JLabel lblNewLabel_1_1_2_1 = new JLabel("2.");

lblNewLabel_1_1_2_1.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_1_1_2_1.setForeground(Color.WHITE);

lblNewLabel_1_1_2_1.setFont(new Font("Tahoma", Font.PLAIN, 16));

lblNewLabel_1_1_2_1.setBackground(Color.WHITE);

lblNewLabel_1_1_2_1.setBounds(10, 153, 107, 32);

frame.getContentPane().add(lblNewLabel_1_1_2_1);

JLabel lblNewLabel_1_1_2_2 = new JLabel("Christmas Event");

lblNewLabel_1_1_2_2.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_1_1_2_2.setForeground(Color.WHITE);

lblNewLabel_1_1_2_2.setFont(new Font("Tahoma", Font.PLAIN, 16));

lblNewLabel_1_1_2_2.setBackground(Color.WHITE);

lblNewLabel_1_1_2_2.setBounds(115, 110, 127, 32);

frame.getContentPane().add(lblNewLabel_1_1_2_2);
JLabel lblNewLabel_1_1_2_2_1 = new JLabel("Holi Event");

lblNewLabel_1_1_2_2_1.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_1_1_2_2_1.setForeground(Color.WHITE);

lblNewLabel_1_1_2_2_1.setFont(new Font("Tahoma", Font.PLAIN, 16));

lblNewLabel_1_1_2_2_1.setBackground(Color.WHITE);

lblNewLabel_1_1_2_2_1.setBounds(115, 153, 127, 32);

frame.getContentPane().add(lblNewLabel_1_1_2_2_1);

JLabel lblNewLabel_1_1_2_2_2 = new JLabel("4883");

lblNewLabel_1_1_2_2_2.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_1_1_2_2_2.setForeground(Color.WHITE);

lblNewLabel_1_1_2_2_2.setFont(new Font("Tahoma", Font.PLAIN, 16));

lblNewLabel_1_1_2_2_2.setBackground(Color.WHITE);

lblNewLabel_1_1_2_2_2.setBounds(258, 110, 125, 32);

frame.getContentPane().add(lblNewLabel_1_1_2_2_2);

JLabel lblNewLabel_1_1_2_2_2_1 = new JLabel("4995");

lblNewLabel_1_1_2_2_2_1.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_1_1_2_2_2_1.setForeground(Color.WHITE);

lblNewLabel_1_1_2_2_2_1.setFont(new Font("Tahoma", Font.PLAIN, 16));

lblNewLabel_1_1_2_2_2_1.setBackground(Color.WHITE);

lblNewLabel_1_1_2_2_2_1.setBounds(268, 153, 107, 32);

frame.getContentPane().add(lblNewLabel_1_1_2_2_2_1);

JButton btnNewButton = new JButton("Cancel Event");

btnNewButton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

int x= JOptionPane.showConfirmDialog(null, "Are you sure ?","Cancel", JOptionPane.YES_NO_OPTION);

if(x ==0) {

JOptionPane.showMessageDialog(null,"You cancelled the booking for Christmas Event


!");
}

});

btnNewButton.setBounds(393, 112, 113, 32);

frame.getContentPane().add(btnNewButton);

JButton btnNewButton_1 = new JButton("Cancel Event");

btnNewButton_1.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

int x= JOptionPane.showConfirmDialog(null, "Are you sure ?","Cancel",


JOptionPane.YES_NO_OPTION);

if(x ==0) {

JOptionPane.showMessageDialog(null,"You cancelled the booking for Holi


Event !");

});

btnNewButton_1.setBounds(393, 155, 113, 32);

frame.getContentPane().add(btnNewButton_1);

JButton btnNewButton_2 = new JButton("BACK");

btnNewButton_2.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

frame.dispose();

});

btnNewButton_2.setBounds(232, 277, 89, 23);

frame.getContentPane().add(btnNewButton_2);

JLabel lblNewLabel_2 = new JLabel("Find your booked events here!");

lblNewLabel_2.setFont(new Font("Tahoma", Font.PLAIN, 14));


lblNewLabel_2.setForeground(new Color(0, 255, 255));

lblNewLabel_2.setHorizontalAlignment(SwingConstants.CENTER);

lblNewLabel_2.setBounds(200, 27, 210, 52);

frame.getContentPane().add(lblNewLabel_2);

frame.setBounds(380,170,601,350);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

5. SearchEvents:
package ia;

import java.awt.EventQueue;

import javax.swing.JFrame;

import java.awt.Color;

import javax.swing.JButton;

import java.awt.Font;

import java.awt.event.ActionListener;

import java.awt.event.ActionEvent;

import javax.swing.JLabel;

import javax.swing.ImageIcon;

public class SearchEvents {

private JFrame frame;

/**

* Launch the application.

*/

public static void NewScreen2() {

EventQueue.invokeLater(new Runnable() {

public void run() {


try {

SearchEvents window = new SearchEvents();

window.frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace();

});

/**

* Create the application.

*/

public SearchEvents() {

initialize();

/**

* Initialize the contents of the frame.

*/

private void initialize() {

frame = new JFrame();

frame.getContentPane().setBackground(new Color(0, 128, 128));

frame.getContentPane().setForeground(new Color(255, 255, 255));

frame.setBounds(380,170,601,450);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.getContentPane().setLayout(null);

JButton btnNewButton = new JButton("CHRISTMAS EVENT");

btnNewButton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

frame.dispose();

ChristmasEvent Homepage4= new ChristmasEvent();


Homepage4.NewScreen4();

});

btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 13));

btnNewButton.setBounds(173, 41, 222, 37);

frame.getContentPane().add(btnNewButton);

JButton btnHoliEvent = new JButton("HOLI EVENT");

btnHoliEvent.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

frame.dispose();

HoliEvent Homepage6= new HoliEvent();

Homepage6.NewScreen5();

});

btnHoliEvent.setFont(new Font("Tahoma", Font.PLAIN, 13));

btnHoliEvent.setBounds(173, 126, 222, 37);

frame.getContentPane().add(btnHoliEvent);

JButton btnBloodDonation = new JButton("BLOOD DONATION EVENT");

btnBloodDonation.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

frame.dispose();

BloodDonation Homepage7= new BloodDonation();

Homepage7.NewScreen6();

});

btnBloodDonation.setFont(new Font("Tahoma", Font.PLAIN, 13));

btnBloodDonation.setBounds(173, 200, 222, 37);

frame.getContentPane().add(btnBloodDonation);

JButton btnNewButton_1 = new JButton("BACK");

btnNewButton_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {

frame.dispose();

});

btnNewButton_1.setFont(new Font("Tahoma", Font.BOLD, 11));

btnNewButton_1.setBounds(238, 366, 89, 23);

frame.getContentPane().add(btnNewButton_1);

JButton btnValentinesDayEvent = new JButton("VALENTINE'S DAY EVENT");

btnValentinesDayEvent.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

frame.dispose();

Valentineday Homepage8= new Valentineday();

Homepage8.NewScreen7();

});

btnValentinesDayEvent.setFont(new Font("Tahoma", Font.PLAIN, 13));

btnValentinesDayEvent.setBounds(173, 274, 222, 37);

frame.getContentPane().add(btnValentinesDayEvent);

JLabel lblNewLabel = new JLabel("");

lblNewLabel.setIcon(new ImageIcon(SearchEvents.class.getResource("/fantu.jpg")));

lblNewLabel.setBounds(0, 0, 585, 411);

frame.getContentPane().add(lblNewLabel);

6. ChristmasEvent:
package ia;

import java.awt.EventQueue;

import javax.swing.JFrame;
import java.awt.Color;

import javax.swing.JLabel;

import javax.swing.JPanel;

import javax.swing.JTextPane;

import javax.swing.JEditorPane;

import javax.swing.SwingConstants;

import java.awt.Font;

import javax.swing.JTextArea;

import javax.swing.JMenuBar;

import javax.swing.JOptionPane;

import javax.swing.JButton;

import java.awt.event.ActionListener;

import java.awt.event.ActionEvent;

public class ChristmasEvent {

private JFrame frame;

/**

* Launch the application.

*/

public static void NewScreen4() {

EventQueue.invokeLater(new Runnable() {

public void run() {

try {

ChristmasEvent window = new ChristmasEvent();

window.frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace();

});

}
/**

* Create the application.

*/

public ChristmasEvent() {

initialize();

/**

* Initialize the contents of the frame.

*/

private void initialize() {

frame = new JFrame();

frame.getContentPane().setBackground(new Color(127, 255, 212));

frame.setBounds(460, 100, 450, 600);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.getContentPane().setLayout(null);

JLabel lblNewLabel = new JLabel("Event Title: Christmas");

lblNewLabel.setBounds(21, 33, 168, 31);

lblNewLabel.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);

frame.getContentPane().add(lblNewLabel);

JLabel lblEventId = new JLabel("Event ID: 4883");

lblEventId.setHorizontalAlignment(SwingConstants.CENTER);

lblEventId.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventId.setBounds(30, 85, 122, 31);

frame.getContentPane().add(lblEventId);

JLabel lblEventType = new JLabel("Event Type: Physical");

lblEventType.setHorizontalAlignment(SwingConstants.CENTER);

lblEventType.setFont(new Font("Sylfaen", Font.PLAIN, 15));


lblEventType.setBounds(30, 138, 159, 31);

frame.getContentPane().add(lblEventType);

JLabel lblEventTime = new JLabel("Event Time: 10 AM");

lblEventTime.setHorizontalAlignment(SwingConstants.CENTER);

lblEventTime.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventTime.setBounds(30, 186, 150, 31);

frame.getContentPane().add(lblEventTime);

JLabel lblEventDate = new JLabel("Event Date: 25-12-2020");

lblEventDate.setHorizontalAlignment(SwingConstants.CENTER);

lblEventDate.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventDate.setBounds(30, 236, 176, 31);

frame.getContentPane().add(lblEventDate);

JLabel lblEventLocation = new JLabel("Event Location: Kandevasthan,Lalitpur");

lblEventLocation.setHorizontalAlignment(SwingConstants.CENTER);

lblEventLocation.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventLocation.setBounds(10, 278, 295, 31);

frame.getContentPane().add(lblEventLocation);

JLabel lblEventDescription = new JLabel("Description: There will be games, gift exchanging surprise and ");

lblEventDescription.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventDescription.setBounds(21, 351, 403, 60);

frame.getContentPane().add(lblEventDescription);

JLabel lblEventCollege = new JLabel("College: Patan College For Professional Studies");

lblEventCollege.setHorizontalAlignment(SwingConstants.CENTER);

lblEventCollege.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventCollege.setBounds(21, 320, 322, 31);

frame.getContentPane().add(lblEventCollege);

JButton btnNewButton = new JButton("Book Event");


btnNewButton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent arg0) {

int x= JOptionPane.showConfirmDialog(null, "Do you really want to book this


event?","Book", JOptionPane.YES_NO_OPTION);

if(x ==0) {

JOptionPane.showMessageDialog(null,"Event is booked ! For more details, you will be


informed via mail. Stay in touch ! Thank You !");

else {

JOptionPane.showMessageDialog(null,"Event is not booked !");

});

btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 15));

btnNewButton.setBounds(129, 463, 176, 49);

frame.getContentPane().add(btnNewButton);

JButton btnNewButton_1 = new JButton("Back");

btnNewButton_1.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

frame.dispose();

SearchEvents Homepage5= new SearchEvents();

Homepage5.NewScreen2();

});

btnNewButton_1.setBounds(173, 527, 89, 23);

frame.getContentPane().add(btnNewButton_1);

JLabel lblSomePerformances = new JLabel("some performances");

lblSomePerformances.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblSomePerformances.setBounds(94, 397, 168, 31);


frame.getContentPane().add(lblSomePerformances);

7. HoliEvent:
package ia;

import java.awt.EventQueue;

import javax.swing.JFrame;

import java.awt.Color;

import javax.swing.JLabel;

import javax.swing.JPanel;

import javax.swing.JTextPane;

import javax.swing.JEditorPane;

import javax.swing.SwingConstants;

import java.awt.Font;

import javax.swing.JTextArea;

import javax.swing.JMenuBar;

import javax.swing.JOptionPane;

import javax.swing.JButton;

import java.awt.event.ActionListener;

import java.awt.event.ActionEvent;

public class HoliEvent {

private JFrame frame;

/**

* Launch the application.

*/

public static void NewScreen5() {

EventQueue.invokeLater(new Runnable() {
public void run() {

try {

HoliEvent window = new HoliEvent();

window.frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace();

});

/**

* Create the application.

*/

public HoliEvent() {

initialize();

/**

* Initialize the contents of the frame.

*/

private void initialize() {

frame = new JFrame();

frame.getContentPane().setBackground(new Color(127, 255, 212));

frame.setBounds(460, 100, 450, 600);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.getContentPane().setLayout(null);

JLabel lblNewLabel = new JLabel("Event Title: Holi");

lblNewLabel.setBounds(21, 33, 150, 31);

lblNewLabel.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);

frame.getContentPane().add(lblNewLabel);
JLabel lblEventId = new JLabel("Event ID: 4995");

lblEventId.setHorizontalAlignment(SwingConstants.CENTER);

lblEventId.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventId.setBounds(30, 85, 122, 31);

frame.getContentPane().add(lblEventId);

JLabel lblEventType = new JLabel("Event Type: Physical");

lblEventType.setHorizontalAlignment(SwingConstants.CENTER);

lblEventType.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventType.setBounds(30, 138, 159, 31);

frame.getContentPane().add(lblEventType);

JLabel lblEventTime = new JLabel("Event Time: 11 AM");

lblEventTime.setHorizontalAlignment(SwingConstants.CENTER);

lblEventTime.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventTime.setBounds(30, 186, 150, 31);

frame.getContentPane().add(lblEventTime);

JLabel lblEventDate = new JLabel("Event Date: 27-08-2020");

lblEventDate.setHorizontalAlignment(SwingConstants.CENTER);

lblEventDate.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventDate.setBounds(30, 236, 176, 31);

frame.getContentPane().add(lblEventDate);

JLabel lblEventLocation = new JLabel("Event Location: Kandevasthan,Lalitpur");

lblEventLocation.setHorizontalAlignment(SwingConstants.CENTER);

lblEventLocation.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventLocation.setBounds(10, 278, 295, 31);

frame.getContentPane().add(lblEventLocation);

JLabel lblEventDescription = new JLabel("Description: We have musical and dance perfomances and ");

lblEventDescription.setFont(new Font("Sylfaen", Font.PLAIN, 15));


lblEventDescription.setBounds(21, 362, 387, 31);

frame.getContentPane().add(lblEventDescription);

JLabel lblEventCollege = new JLabel("College: Patan College For Professional Studies");

lblEventCollege.setHorizontalAlignment(SwingConstants.CENTER);

lblEventCollege.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventCollege.setBounds(21, 320, 322, 31);

frame.getContentPane().add(lblEventCollege);

JButton btnNewButton = new JButton("Book Event");

btnNewButton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

int x= JOptionPane.showConfirmDialog(null, "Do you really want to book this event?","Book",


JOptionPane.YES_NO_OPTION);

if(x ==0) {

JOptionPane.showMessageDialog(null,"Event is booked ! For more details, you will be


informed via mail. Stay in touch ! Thank You !");

else {

JOptionPane.showMessageDialog(null,"Event is not booked !");

});

btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 15));

btnNewButton.setBounds(129, 467, 176, 49);

frame.getContentPane().add(btnNewButton);

JButton btnNewButton_1 = new JButton("Back");

btnNewButton_1.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

frame.dispose();
SearchEvents Homepage5= new SearchEvents();

Homepage5.NewScreen2();

});

btnNewButton_1.setBounds(173, 527, 89, 23);

frame.getContentPane().add(btnNewButton_1);

JLabel lblMillionsOfColors = new JLabel("millions of colors for you");

lblMillionsOfColors.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblMillionsOfColors.setBounds(101, 390, 210, 31);

frame.getContentPane().add(lblMillionsOfColors);

8. BloodDonation:
package ia;

import java.awt.EventQueue;

import javax.swing.JFrame;

import java.awt.Color;

import javax.swing.JLabel;

import javax.swing.JPanel;

import javax.swing.JTextPane;

import javax.swing.JEditorPane;

import javax.swing.SwingConstants;

import java.awt.Font;

import javax.swing.JTextArea;

import javax.swing.JMenuBar;

import javax.swing.JOptionPane;
import javax.swing.JButton;

import java.awt.event.ActionListener;

import java.awt.event.ActionEvent;

public class HoliEvent {

private JFrame frame;

/**

* Launch the application.

*/

public static void NewScreen5() {

EventQueue.invokeLater(new Runnable() {

public void run() {

try {

HoliEvent window = new HoliEvent();

window.frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace();

});

/**

* Create the application.

*/

public HoliEvent() {

initialize();

/**

* Initialize the contents of the frame.


*/

private void initialize() {

frame = new JFrame();

frame.getContentPane().setBackground(new Color(127, 255, 212));

frame.setBounds(460, 100, 450, 600);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.getContentPane().setLayout(null);

JLabel lblNewLabel = new JLabel("Event Title: Holi");

lblNewLabel.setBounds(21, 33, 150, 31);

lblNewLabel.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);

frame.getContentPane().add(lblNewLabel);

JLabel lblEventId = new JLabel("Event ID: 4995");

lblEventId.setHorizontalAlignment(SwingConstants.CENTER);

lblEventId.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventId.setBounds(30, 85, 122, 31);

frame.getContentPane().add(lblEventId);

JLabel lblEventType = new JLabel("Event Type: Physical");

lblEventType.setHorizontalAlignment(SwingConstants.CENTER);

lblEventType.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventType.setBounds(30, 138, 159, 31);

frame.getContentPane().add(lblEventType);

JLabel lblEventTime = new JLabel("Event Time: 11 AM");

lblEventTime.setHorizontalAlignment(SwingConstants.CENTER);

lblEventTime.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventTime.setBounds(30, 186, 150, 31);

frame.getContentPane().add(lblEventTime);

JLabel lblEventDate = new JLabel("Event Date: 27-08-2020");


lblEventDate.setHorizontalAlignment(SwingConstants.CENTER);

lblEventDate.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventDate.setBounds(30, 236, 176, 31);

frame.getContentPane().add(lblEventDate);

JLabel lblEventLocation = new JLabel("Event Location: Kandevasthan,Lalitpur");

lblEventLocation.setHorizontalAlignment(SwingConstants.CENTER);

lblEventLocation.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventLocation.setBounds(10, 278, 295, 31);

frame.getContentPane().add(lblEventLocation);

JLabel lblEventDescription = new JLabel("Description: We have musical and dance perfomances and ");

lblEventDescription.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventDescription.setBounds(21, 362, 387, 31);

frame.getContentPane().add(lblEventDescription);

JLabel lblEventCollege = new JLabel("College: Patan College For Professional Studies");

lblEventCollege.setHorizontalAlignment(SwingConstants.CENTER);

lblEventCollege.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventCollege.setBounds(21, 320, 322, 31);

frame.getContentPane().add(lblEventCollege);

JButton btnNewButton = new JButton("Book Event");

btnNewButton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

int x= JOptionPane.showConfirmDialog(null, "Do you really want to book this event?","Book",


JOptionPane.YES_NO_OPTION);

if(x ==0) {

JOptionPane.showMessageDialog(null,"Event is booked ! For more details, you will be


informed via mail. Stay in touch ! Thank You !");

}
else {

JOptionPane.showMessageDialog(null,"Event is not booked !");

});

btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 15));

btnNewButton.setBounds(129, 467, 176, 49);

frame.getContentPane().add(btnNewButton);

JButton btnNewButton_1 = new JButton("Back");

btnNewButton_1.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

frame.dispose();

SearchEvents Homepage5= new SearchEvents();

Homepage5.NewScreen2();

});

btnNewButton_1.setBounds(173, 527, 89, 23);

frame.getContentPane().add(btnNewButton_1);

JLabel lblMillionsOfColors = new JLabel("millions of colors for you");

lblMillionsOfColors.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblMillionsOfColors.setBounds(101, 390, 210, 31);

frame.getContentPane().add(lblMillionsOfColors);

9. ValentineDay:
package ia;
import java.awt.EventQueue;

import javax.swing.JFrame;

import java.awt.Color;

import javax.swing.JLabel;

import javax.swing.JPanel;

import javax.swing.JTextPane;

import javax.swing.JEditorPane;

import javax.swing.SwingConstants;

import java.awt.Font;

import javax.swing.JTextArea;

import javax.swing.JMenuBar;

import javax.swing.JOptionPane;

import javax.swing.JButton;

import java.awt.event.ActionListener;

import java.awt.event.ActionEvent;

public class HoliEvent {

private JFrame frame;

/**

* Launch the application.

*/

public static void NewScreen5() {

EventQueue.invokeLater(new Runnable() {

public void run() {

try {

HoliEvent window = new HoliEvent();

window.frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace();
}

});

/**

* Create the application.

*/

public HoliEvent() {

initialize();

/**

* Initialize the contents of the frame.

*/

private void initialize() {

frame = new JFrame();

frame.getContentPane().setBackground(new Color(127, 255, 212));

frame.setBounds(460, 100, 450, 600);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.getContentPane().setLayout(null);

JLabel lblNewLabel = new JLabel("Event Title: Holi");

lblNewLabel.setBounds(21, 33, 150, 31);

lblNewLabel.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);

frame.getContentPane().add(lblNewLabel);

JLabel lblEventId = new JLabel("Event ID: 4995");

lblEventId.setHorizontalAlignment(SwingConstants.CENTER);

lblEventId.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventId.setBounds(30, 85, 122, 31);

frame.getContentPane().add(lblEventId);
JLabel lblEventType = new JLabel("Event Type: Physical");

lblEventType.setHorizontalAlignment(SwingConstants.CENTER);

lblEventType.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventType.setBounds(30, 138, 159, 31);

frame.getContentPane().add(lblEventType);

JLabel lblEventTime = new JLabel("Event Time: 11 AM");

lblEventTime.setHorizontalAlignment(SwingConstants.CENTER);

lblEventTime.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventTime.setBounds(30, 186, 150, 31);

frame.getContentPane().add(lblEventTime);

JLabel lblEventDate = new JLabel("Event Date: 27-08-2020");

lblEventDate.setHorizontalAlignment(SwingConstants.CENTER);

lblEventDate.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventDate.setBounds(30, 236, 176, 31);

frame.getContentPane().add(lblEventDate);

JLabel lblEventLocation = new JLabel("Event Location: Kandevasthan,Lalitpur");

lblEventLocation.setHorizontalAlignment(SwingConstants.CENTER);

lblEventLocation.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventLocation.setBounds(10, 278, 295, 31);

frame.getContentPane().add(lblEventLocation);

JLabel lblEventDescription = new JLabel("Description: We have musical and dance perfomances and ");

lblEventDescription.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblEventDescription.setBounds(21, 362, 387, 31);

frame.getContentPane().add(lblEventDescription);

JLabel lblEventCollege = new JLabel("College: Patan College For Professional Studies");

lblEventCollege.setHorizontalAlignment(SwingConstants.CENTER);

lblEventCollege.setFont(new Font("Sylfaen", Font.PLAIN, 15));


lblEventCollege.setBounds(21, 320, 322, 31);

frame.getContentPane().add(lblEventCollege);

JButton btnNewButton = new JButton("Book Event");

btnNewButton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

int x= JOptionPane.showConfirmDialog(null, "Do you really want to book this event?","Book",


JOptionPane.YES_NO_OPTION);

if(x ==0) {

JOptionPane.showMessageDialog(null,"Event is booked ! For more details, you will be


informed via mail. Stay in touch ! Thank You !");

else {

JOptionPane.showMessageDialog(null,"Event is not booked !");

});

btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 15));

btnNewButton.setBounds(129, 467, 176, 49);

frame.getContentPane().add(btnNewButton);

JButton btnNewButton_1 = new JButton("Back");

btnNewButton_1.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

frame.dispose();

SearchEvents Homepage5= new SearchEvents();

Homepage5.NewScreen2();

});

btnNewButton_1.setBounds(173, 527, 89, 23);

frame.getContentPane().add(btnNewButton_1);
JLabel lblMillionsOfColors = new JLabel("millions of colors for you");

lblMillionsOfColors.setFont(new Font("Sylfaen", Font.PLAIN, 15));

lblMillionsOfColors.setBounds(101, 390, 210, 31);

frame.getContentPane().add(lblMillionsOfColors);

Screenshots of interfaces are above.

You might also like