Principles of Programming Assignment
Principles of Programming Assignment
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.
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.
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.
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.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.
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();
}
}
if (Studentidentity.equals("")) {
JOptionPane.showMessageDialog(null,"Student ID cannot be empty !"); }
else if (Password.equals("")) {
JOptionPane.showMessageDialog(null,"Password cannot
be empty !");
}
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
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;
/**
*/
EventQueue.invokeLater(new Runnable() {
try {
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
});
/**
*/
public Loggin() {
initialize();
/**
*/
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
contentPane.setLayout(null);
frame.getContentPane().add(contentPane);
Stid.setColumns(10);
contentPane.add(Stid);
contentPane.add(Pwd);
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
lblNewLabel.setForeground(Color.WHITE);
contentPane.add(lblNewLabel);
btnNewButton.addActionListener(new ActionListener() {
String Studentidentity=Stid.getText();
String Password=Pwd.getText();
if (Studentidentity.equals("")) {
else if (Password.equals("")) {
HomePage.NewScreen();
});
contentPane.add(btnNewButton);
});
btnClose.addMouseListener(new MouseAdapter() {
@Override
frame.dispose();
});
contentPane.add(btnClose);
lblNewLabel_2.setIcon(new ImageIcon(Loggin.class.getResource("/party.jpg")));
lblNewLabel_2.setHorizontalAlignment(SwingConstants.CENTER);
contentPane.add(lblNewLabel_2);
lblNewLabel_3.setHorizontalAlignment(SwingConstants.CENTER);
lblNewLabel_3.setForeground(Color.WHITE);
lblNewLabel_3.setBackground(Color.WHITE);
contentPane.add(lblNewLabel_3);
lblNewLabel_4.setForeground(Color.ORANGE);
contentPane.add(lblNewLabel_4);
btnNewButton_1.addActionListener(new ActionListener() {
HomePage44.NewScreen44();
});
contentPane.add(btnNewButton_1);
lblNewLabel_5.setHorizontalAlignment(SwingConstants.CENTER);
lblNewLabel_5.setForeground(Color.WHITE);
contentPane.add(lblNewLabel_5);
lblNewLabel_6.setForeground(Color.WHITE);
contentPane.add(lblNewLabel_6);
lblNewLabel_1.setHorizontalAlignment(SwingConstants.CENTER);
contentPane.add(lblNewLabel_1);
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;
/**
*/
EventQueue.invokeLater(new Runnable() {
try {
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
});
/**
*/
public Login2() {
initialize();
/**
*/
frame.getContentPane().setBackground(Color.BLACK);
frame.getContentPane().setForeground(Color.WHITE);
frame.getContentPane().setLayout(null);
btnNewButton.addActionListener(new ActionListener() {
frame.dispose();
});
frame.getContentPane().add(btnNewButton);
btnNewButton_1.addActionListener(new ActionListener() {
HomePage2.NewScreen2();
});
frame.getContentPane().add(btnNewButton_1);
btnNewButton_2.addActionListener(new ActionListener() {
HomePage3.NewScreen3();
});
frame.getContentPane().add(btnNewButton_2);
lblNewLabel.setForeground(Color.WHITE);
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblNewLabel);
lblNewLabel_1.setIcon(new ImageIcon(Login2.class.getResource("/abcd.jpg")));
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;
/**
*/
EventQueue.invokeLater(new Runnable() {
try {
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
/**
*/
public Register() {
initialize();
/**
*/
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblNewLabel);
lblNewLabel_1.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblNewLabel_1);
JLabel lblLastName = new JLabel("Last Name");
lblLastName.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblLastName);
lblEmail.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEmail);
lblContactNo.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblContactNo);
lblNewLabel_5.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblNewLabel_5);
lblPassword.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblPassword);
frame.getContentPane().add(FirstName);
FirstName.setColumns(10);
LastName.setColumns(10);
frame.getContentPane().add(LastName);
Email.setColumns(10);
frame.getContentPane().add(Email);
Contact.setColumns(10);
frame.getContentPane().add(Contact);
Studentid.setColumns(10);
frame.getContentPane().add(Studentid);
frame.getContentPane().add(password);
btnNewButton.addActionListener(new ActionListener() {
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("")) {
else if (Lname.equals("")) {
else if (email.equals("")) {
else if (contact.equals("")) {
else if (studentid.equals("")) {
else if (Password.equals("")) {
else {
});
frame.getContentPane().add(btnNewButton);
btnNewButton_1.addActionListener(new ActionListener() {
frame.dispose();
});
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;
/**
*/
EventQueue.invokeLater(new Runnable() {
try {
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
});
/**
*/
public Mybookings() {
initialize();
}
/**
*/
frame.getContentPane().setLayout(null);
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblNewLabel);
lblNewLabel_1.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblNewLabel_1);
lblNewLabel_1_1.setHorizontalAlignment(SwingConstants.CENTER);
lblNewLabel_1_1.setForeground(Color.WHITE);
lblNewLabel_1_1.setBackground(Color.WHITE);
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.setBackground(Color.WHITE);
frame.getContentPane().add(lblNewLabel_1_1_1);
lblNewLabel_1_1_2.setHorizontalAlignment(SwingConstants.CENTER);
lblNewLabel_1_1_2.setForeground(Color.WHITE);
lblNewLabel_1_1_2.setBackground(Color.WHITE);
frame.getContentPane().add(lblNewLabel_1_1_2);
lblNewLabel_1_1_2_1.setHorizontalAlignment(SwingConstants.CENTER);
lblNewLabel_1_1_2_1.setForeground(Color.WHITE);
lblNewLabel_1_1_2_1.setBackground(Color.WHITE);
frame.getContentPane().add(lblNewLabel_1_1_2_1);
lblNewLabel_1_1_2_2.setHorizontalAlignment(SwingConstants.CENTER);
lblNewLabel_1_1_2_2.setForeground(Color.WHITE);
lblNewLabel_1_1_2_2.setBackground(Color.WHITE);
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.setBackground(Color.WHITE);
frame.getContentPane().add(lblNewLabel_1_1_2_2_1);
lblNewLabel_1_1_2_2_2.setHorizontalAlignment(SwingConstants.CENTER);
lblNewLabel_1_1_2_2_2.setForeground(Color.WHITE);
lblNewLabel_1_1_2_2_2.setBackground(Color.WHITE);
frame.getContentPane().add(lblNewLabel_1_1_2_2_2);
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.setBackground(Color.WHITE);
frame.getContentPane().add(lblNewLabel_1_1_2_2_2_1);
btnNewButton.addActionListener(new ActionListener() {
if(x ==0) {
});
frame.getContentPane().add(btnNewButton);
btnNewButton_1.addActionListener(new ActionListener() {
if(x ==0) {
});
frame.getContentPane().add(btnNewButton_1);
btnNewButton_2.addActionListener(new ActionListener() {
frame.dispose();
});
frame.getContentPane().add(btnNewButton_2);
lblNewLabel_2.setHorizontalAlignment(SwingConstants.CENTER);
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;
/**
*/
EventQueue.invokeLater(new Runnable() {
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
});
/**
*/
public SearchEvents() {
initialize();
/**
*/
frame.setBounds(380,170,601,450);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
btnNewButton.addActionListener(new ActionListener() {
frame.dispose();
});
frame.getContentPane().add(btnNewButton);
btnHoliEvent.addActionListener(new ActionListener() {
frame.dispose();
Homepage6.NewScreen5();
});
frame.getContentPane().add(btnHoliEvent);
btnBloodDonation.addActionListener(new ActionListener() {
frame.dispose();
Homepage7.NewScreen6();
});
frame.getContentPane().add(btnBloodDonation);
btnNewButton_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
frame.dispose();
});
frame.getContentPane().add(btnNewButton_1);
btnValentinesDayEvent.addActionListener(new ActionListener() {
frame.dispose();
Homepage8.NewScreen7();
});
frame.getContentPane().add(btnValentinesDayEvent);
lblNewLabel.setIcon(new ImageIcon(SearchEvents.class.getResource("/fantu.jpg")));
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;
/**
*/
EventQueue.invokeLater(new Runnable() {
try {
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
});
}
/**
*/
public ChristmasEvent() {
initialize();
/**
*/
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblNewLabel);
lblEventId.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventId);
lblEventType.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventType);
lblEventTime.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventTime);
lblEventDate.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventDate);
lblEventLocation.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventLocation);
JLabel lblEventDescription = new JLabel("Description: There will be games, gift exchanging surprise and ");
frame.getContentPane().add(lblEventDescription);
lblEventCollege.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventCollege);
if(x ==0) {
else {
});
frame.getContentPane().add(btnNewButton);
btnNewButton_1.addActionListener(new ActionListener() {
frame.dispose();
Homepage5.NewScreen2();
});
frame.getContentPane().add(btnNewButton_1);
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;
/**
*/
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
});
/**
*/
public HoliEvent() {
initialize();
/**
*/
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblNewLabel);
JLabel lblEventId = new JLabel("Event ID: 4995");
lblEventId.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventId);
lblEventType.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventType);
lblEventTime.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventTime);
lblEventDate.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventDate);
lblEventLocation.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventLocation);
JLabel lblEventDescription = new JLabel("Description: We have musical and dance perfomances and ");
frame.getContentPane().add(lblEventDescription);
lblEventCollege.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventCollege);
btnNewButton.addActionListener(new ActionListener() {
if(x ==0) {
else {
});
frame.getContentPane().add(btnNewButton);
btnNewButton_1.addActionListener(new ActionListener() {
frame.dispose();
SearchEvents Homepage5= new SearchEvents();
Homepage5.NewScreen2();
});
frame.getContentPane().add(btnNewButton_1);
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;
/**
*/
EventQueue.invokeLater(new Runnable() {
try {
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
});
/**
*/
public HoliEvent() {
initialize();
/**
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblNewLabel);
lblEventId.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventId);
lblEventType.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventType);
lblEventTime.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventTime);
frame.getContentPane().add(lblEventDate);
lblEventLocation.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventLocation);
JLabel lblEventDescription = new JLabel("Description: We have musical and dance perfomances and ");
frame.getContentPane().add(lblEventDescription);
lblEventCollege.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventCollege);
btnNewButton.addActionListener(new ActionListener() {
if(x ==0) {
}
else {
});
frame.getContentPane().add(btnNewButton);
btnNewButton_1.addActionListener(new ActionListener() {
frame.dispose();
Homepage5.NewScreen2();
});
frame.getContentPane().add(btnNewButton_1);
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;
/**
*/
EventQueue.invokeLater(new Runnable() {
try {
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
});
/**
*/
public HoliEvent() {
initialize();
/**
*/
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblNewLabel);
lblEventId.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventId);
JLabel lblEventType = new JLabel("Event Type: Physical");
lblEventType.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventType);
lblEventTime.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventTime);
lblEventDate.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventDate);
lblEventLocation.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventLocation);
JLabel lblEventDescription = new JLabel("Description: We have musical and dance perfomances and ");
frame.getContentPane().add(lblEventDescription);
lblEventCollege.setHorizontalAlignment(SwingConstants.CENTER);
frame.getContentPane().add(lblEventCollege);
btnNewButton.addActionListener(new ActionListener() {
if(x ==0) {
else {
});
frame.getContentPane().add(btnNewButton);
btnNewButton_1.addActionListener(new ActionListener() {
frame.dispose();
Homepage5.NewScreen2();
});
frame.getContentPane().add(btnNewButton_1);
JLabel lblMillionsOfColors = new JLabel("millions of colors for you");
frame.getContentPane().add(lblMillionsOfColors);