Hotel System Project File
Hotel System Project File
Submitted By : Submitted To :
Name : Name :
Date : Date :
Roll No : ………………………….
Address : ………………………….
………………………….
Phone No : ………………………….
Supervisor : ………………………….
Student Name
Introduction
Java Details
Priliminary Design
Form Layouts
Database Design
Implementation
Bibliography
Teacher Remarks
project.
There were five primary goals in the creation of the Java language:
Java tools
In order to write java application or applets ,one need more than a language . The tools that
lets one to write , test , debug programs.
Java features
● Compiler and Interpreted
● Platform independent
● Simple
● Secure
● Familiar
● Portable
● Object-Oriented
● Robust
● Multithreaded
● High performance
● Distributed
● Dynamic
Compiler and Interpreted - There is a java compiler , named javac . The java compiler
takes input source code files (these files typically have the ext.java) and converts them into
compiled bytecode files.The java Interpreter known as javac can be used to execute java
application .The interpreter translates bytecode directly into program actions.
Platform independent - Java programs can be easily moved from one computer to
another, anywhere and anytime.Changes and upgrades made in operating systems,
processors and system resources will not force any changes in java programs.
Simple - Java is designed to be easy for programmer to learn and use efficiently.
Portable- Java compiler generates bytecode instructions that can be implemented on any
machine and also the size of the primitive data types are machine independent.
Object-Oriented - Java is a true object-oriented language. All program code and data
reside within objects and classes.
Robust -It provides many safeguards to ensure reliable code. It has strict compile time and
run time checking for data types. Designed as a garbage-collected language relieving the
programmers and also incorpates the concept of exception handling which captures series
errors.
Distributed - It has ability to share both data and programs. Java applications can open
and access remote objects on internet which enables multiple programmers at multiple
remote locations to collaborate and work together on single project.
Dynamic - Java is capable of dynamically in new class libraries , methods and objects .It
supports functions written in other languages like C,C++ called as native methods.
In Java, this potential problem is avoided by automatic garbage collection. The programmer
determines when objects are created and the Java runtime is responsible for managing the
objects' lifecycle. The program or other objects can reference an object by holding a
reference to it (which, from a low-level point of view, is its address on the heap). When no
Comparing Java and C++, it is possible in C++ to implement similar functionality (for
example, a memory management model for specific classes can be designed in C++ to
improve speed and lower memory fragmentation considerably), with the possibly cost of
extra development time and some application complexity. In Java, garbage collection is built
in and virtually invisible to the developer. That is, developers may have no notion of when
garbage collection will take place as it may not necessarily correlate with any actions being
explicitly performed by the code they write. Depending on intended application, this can be
beneficial or disadvantageous: the programmer is freed from performing low-level tasks but
at the same time lose the option of writing lower level code.
Objects and Classes - An object is a software bundle of variables and related methods.
Objects are key to understanding object-oriented technology. Real-world objects share two
characteristics: They all have state and behavior.
Inheritance - Inheritance is the process by which objects of one class acquire the property
of objects of another class. Each subclass inherits state .However, subclasses are not limited
to the states and behaviors provided to them by their superclass. Subclasses can add
variables and methods to the ones they inherit from the superclass. It supports the concept
of hierarchical classification it also provides the use of reusability. .
Polymorphism - This means the ability to take more than one form. An operation may
exhibit different behaviour in different instances. The behaviour depends upon the types of
data used in the operation. It plays an important role in allowing objects having different
internal structures to share external interface.
The Java Database Connectivity (JDBC) API is the industry standard for database-
independent connectivity between the Java programming language and a wide range of
databases – SQL databases and other tabular data sources, such as spreadsheets or flat files.
The JDBC API provides a call-level API for SQL-based database access.
JDBC technology allows you to use the Java programming language to exploit "Write Once,
Run Anywhere" capabilities for applications that require access to enterprise data. With a
JDBC technology-enabled driver, you can connect all corporate data even in a
heterogeneous environment.
Driver
Database
Database
The JDBC architecture is based on a collection of java interfaces and classes that together enable you
to connect to data sources , to create and execute SQL statements and to retrieve and modify data in
a database.
The JDBC-ODBC Bridge –“sun.jdbc.odbc.jdbcodbcDriver”-is included with JDK and it enables
Java applications to access data through drivers written to the ODBC standard. The driver bridge is
useful for accessing data in data sources for which no pure JDBC drivers exist. The bridge works by
translating the JDBC methods into ODBC function calls.
● Data Defination Language (DDL) – DDL statements are used to describe the tables
and the data they contain. The subset of SQL statements used for modeling the structure
(rather than the contents) of a database or cube. The DDL gives you the ability to create,
modify, and remove databases and database objects.
● Data Manipulation Language (DML) – DML statements that are used to operate on
data in the database. These are statements that allow you to create or alter objects (such as
tables, indexes, views, and so on) in the database. The subset of SQL statements used to
retrieve and manipulate data. DML can be further divided into 2 groups:-
SELECT - SQL statement used to request a selection, projection, join, query, and so on,
from a SQL Server database.
Primary key – Primary key constraints identify the column or set of columns whose values
uniquely identify a row in a table. No two rows in a table can have the same primary key
value. You cannot enter a NULL value for any column in a primary key.
Insert - The Insert logical operator inserts each row from its input into the object specified
in the Argument column. To insert the data into a relation we either specify a tuple to be
inserted or write a query.
Delete - The Delete logical operator deletes from an object rows that satisfy the optional
predicate in the Argument column. We can delete only whole tuples; we cannot delete
values on only particular attributes.
Update - The Update logical operator updates each row from its input in the object
specified in the Argument column. It provides a way of modifying existing data in a table.
Jframe and Component – Jframe extends the AWT class Frame. It contains additional
features that enable it to support Swing components. JComponent extends the AWT
component and Container classes. It is the top level class for all Swing components and
provides Swing pluggable look and feel.
Here are some of the Swing component classes:
CLASS DESCRIPTION
Abstract Button Abstract super class for Swing buttons.
Button Group Encapsulates a mutually exclusive set of
buttons.
Image Icon Encapsulates an icon.
JApplet The SWING version of APPLET.
JButton The SWING push button class.
JCheckBox The SWING check box class.
JComboBox Encapsulates a combo box .
JLabels The SWING version of a label.
JRadioButton The SWING version of a radio button.
JScrollPane Encapsulates a scrollable window.
JTabbedPane Encapsulates a tabbed window.
JTextField The SWING version of Text field.
JTree Encapsulates a tree based-control.
● Icons – Icons are encapsulated by the Image Icon class, which paints an icon from an
image.
● JButton – JButton class provides the functionality of a push button. JButton allows an
icon of string to be associated with the push button.
● JComboBox – It is provided through the JComboBox class. It normally displays one entry
and can also display a drop down list that allows a user to select a different entry.
● JTree - It is a component that presents a hierarchical view of data. A user has ability to
expand individual subtrees. These are implemented in Swing by JTree class.
1. It provides more powerful and more flexible components possible in AWT package.
For e.g. JButton can have both image as well as text field associated with it which is
not possible in awt package.
3. Further the Swing components can provide pluggable look and feel, which means
that it is easy to substitute another appearance and behavior for an element.
jButton1.setText("Login"); jPanel3Layout.createParallelGroup(javax.swing.Gr
jButton1.addActionListener(new oupLayout.Alignment.LEADING)
java.awt.event.ActionListener() {
public void .addGroup(jPanel3Layout.createSequentialGroup()
actionPerformed(java.awt.event.ActionEvent evt) { .addGap(51, 51, 51)
jButton1ActionPerformed(evt);
} .addGroup(jPanel3Layout.createParallelGroup(java
}); x.swing.GroupLayout.Alignment.LEADING)
jPanel1.add(jButton1, new .addComponent(jLabel1,
org.netbeans.lib.awtextra.AbsoluteConstraints(110 javax.swing.GroupLayout.PREFERRED_SIZE, 623,
, 90, 90, -1)); javax.swing.GroupLayout.PREFERRED_SIZE)
jButton2.setText("Cancel"); .addGroup(jPanel3Layout.createSequentialGroup()
jButton2.addActionListener(new .addGap(28, 28, 28)
java.awt.event.ActionListener() { .addComponent(jPanel1,
public void javax.swing.GroupLayout.PREFERRED_SIZE, 316,
actionPerformed(java.awt.event.ActionEvent evt) { javax.swing.GroupLayout.PREFERRED_SIZE)
jButton2ActionPerformed(evt); .addGap(30, 30, 30)
} .addComponent(jLabel5)))
}); .addContainerGap(76,
Short.MAX_VALUE))
);
javax.swing.UIManager.setLookAndFeel(info.getCl
*****************************
assName()); import java.awt.Color;
break; import java.text.SimpleDateFormat;
} import java.util.Date;
}
import java.sql.*;
} catch (ClassNotFoundException ex) { import java.text.DateFormat;
import java.util.Calendar;
java.util.logging.Logger.getLogger(login.class.getN import javax.swing.JOptionPane;
ame()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) { public class BookRoom extends javax.swing.JFrame
{
java.util.logging.Logger.getLogger(login.class.getN
Connection con;
ame()).log(java.util.logging.Level.SEVERE, null, ex); Statement smt1,smt2,smt3;
} catch (IllegalAccessException ex) { ResultSet rs;
jLabel25.setFont(new jTextField15.setEnabled(false);
java.awt.Font("Tahoma", 0, 12)); jPanel5.add(jTextField15, new
jLabel25.setForeground(new org.netbeans.lib.awtextra.AbsoluteConstraints(420
java.awt.Color(255, 255, 255)); , 200, 140, -1));
jLabel25.setText("Customer Id");
jPanel5.add(jLabel25, new jButton1.setFont(new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, java.awt.Font("Tahoma", 1, 14));
20, -1, -1)); jButton1.setText("Book Room");
jPanel5.add(jTextField10, new jButton1.addActionListener(new
org.netbeans.lib.awtextra.AbsoluteConstraints(130 java.awt.event.ActionListener() {
, 20, 170, -1)); public void
actionPerformed(java.awt.event.ActionEvent evt) {
jLabel26.setFont(new jButton1ActionPerformed(evt);
java.awt.Font("Tahoma", 0, 12)); }
jLabel26.setForeground(new });
java.awt.Color(255, 255, 255)); jPanel5.add(jButton1, new
jLabel26.setText("No of Adult"); org.netbeans.lib.awtextra.AbsoluteConstraints(330
jPanel5.add(jLabel26, new , 240, 160, 30));
org.netbeans.lib.awtextra.AbsoluteConstraints(340
, 80, -1, -1)); jLabel28.setFont(new
jPanel5.add(jTextField11, new java.awt.Font("Tahoma", 0, 12));
org.netbeans.lib.awtextra.AbsoluteConstraints(420 jLabel28.setForeground(new
, 80, 140, -1)); java.awt.Color(255, 255, 255));
jLabel28.setText("No of days");
jLabel27.setFont(new jPanel5.add(jLabel28, new
java.awt.Font("Tahoma", 0, 12)); org.netbeans.lib.awtextra.AbsoluteConstraints(340
jLabel27.setForeground(new , 170, -1, -1));
java.awt.Color(255, 255, 255));
jLabel27.setText("No of Minor"); jTextField13.setEnabled(false);
jPanel5.add(jLabel27, new jPanel5.add(jTextField13, new
org.netbeans.lib.awtextra.AbsoluteConstraints(340 org.netbeans.lib.awtextra.AbsoluteConstraints(420
, 110, -1, -1)); , 170, 140, -1));
jPanel5.add(jTextField12, new
org.netbeans.lib.awtextra.AbsoluteConstraints(420 jButton3.setFont(new
, 110, 140, -1)); java.awt.Font("Tahoma", 1, 14));
jButton3.setText("Close");
jLabel29.setFont(new jButton3.addActionListener(new
java.awt.Font("Tahoma", 0, 12)); java.awt.event.ActionListener() {
row++;
} cpur=jTextField8.getText();
int
code=JOptionPane.showConfirmDialog(this,"Room
if(row==0) No. " + roomno + " is booked for " + cname + ""
jTextField3.setBackground(new jButton6.setFont(new
java.awt.Color(250, 250, 255)); java.awt.Font("Tahoma", 0, 12));
jButton6.setText("Previous <");
jTextField4.setBackground(new jButton6.addActionListener(new
java.awt.Color(250, 250, 255)); java.awt.event.ActionListener() {
public void
jTextField5.setBackground(new actionPerformed(java.awt.event.ActionEvent evt) {
java.awt.Color(250, 250, 255)); jButton6ActionPerformed(evt);
}
jTextField6.setBackground(new });
java.awt.Color(250, 250, 255));
jButton8.setFont(new
jTextField7.setBackground(new java.awt.Font("Tahoma", 0, 12));
java.awt.Color(250, 250, 255)); jButton8.setText("Last >>");
jButton8.addActionListener(new
jTextField8.setBackground(new java.awt.event.ActionListener() {
java.awt.Color(250, 250, 255)); public void
actionPerformed(java.awt.event.ActionEvent evt) {
jLabel16.setText("Booking ID"); jButton8ActionPerformed(evt);
}
jLabel15.setText("Bill Amount"); });
jButton1.setText("Search"); .addGroup(jPanel1Layout.createParallelGroup(java
jButton1.addActionListener(new x.swing.GroupLayout.Alignment.LEADING)
java.awt.event.ActionListener() { .addComponent(jTextField10,
public void javax.swing.GroupLayout.DEFAULT_SIZE, 172,
actionPerformed(java.awt.event.ActionEvent evt) { Short.MAX_VALUE)
jButton1ActionPerformed(evt); .addComponent(jTextField11,
} javax.swing.GroupLayout.DEFAULT_SIZE, 172,
}); Short.MAX_VALUE)))
jButton2.setText("CLOSE"); .addGroup(javax.swing.GroupLayout.Alignment.TR
jButton2.addActionListener(new AILING, jPanel1Layout.createSequentialGroup()
java.awt.event.ActionListener() {
public void .addGroup(jPanel1Layout.createParallelGroup(java
actionPerformed(java.awt.event.ActionEvent evt) { x.swing.GroupLayout.Alignment.LEADING)
jButton2ActionPerformed(evt); .addComponent(jLabel2)
} .addComponent(jLabel3)
}); .addComponent(jLabel4)
.addComponent(jLabel5)
jTextField13.setBackground(new .addComponent(jLabel6)
java.awt.Color(250, 250, 255)); .addComponent(jLabel7)
.addComponent(jLabel8)
jLabel9.setText("Visitor ID"); .addComponent(jLabel9))
.addGap(67, 67, 67)
javax.swing.GroupLayout jPanel1Layout = new
javax.swing.GroupLayout(jPanel1); .addGroup(jPanel1Layout.createParallelGroup(java
jPanel1.setLayout(jPanel1Layout); x.swing.GroupLayout.Alignment.LEADING)
jPanel1Layout.setHorizontalGroup( .addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 172,
jPanel1Layout.createParallelGroup(javax.swing.Gr Short.MAX_VALUE)
oupLayout.Alignment.LEADING) .addComponent(jTextField2,
javax.swing.GroupLayout.DEFAULT_SIZE, 172,
.addGroup(javax.swing.GroupLayout.Alignment.TR Short.MAX_VALUE)
AILING, jPanel1Layout.createSequentialGroup() .addComponent(jTextField3,
.addGap(56, 56, 56) javax.swing.GroupLayout.DEFAULT_SIZE, 172,
Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(java .addComponent(jTextField4,
x.swing.GroupLayout.Alignment.LEADING) javax.swing.GroupLayout.DEFAULT_SIZE, 172,
.addComponent(jLabel1, Short.MAX_VALUE)
javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jTextField5,
javax.swing.GroupLayout.DEFAULT_SIZE, 172,
.addGroup(javax.swing.GroupLayout.Alignment.TR Short.MAX_VALUE)
AILING, jPanel1Layout.createSequentialGroup() .addComponent(jTextField6,
.addGap(21, 21, 21) javax.swing.GroupLayout.DEFAULT_SIZE, 172,
Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(java .addComponent(jTextField7,
x.swing.GroupLayout.Alignment.LEADING) javax.swing.GroupLayout.DEFAULT_SIZE, 172,
Short.MAX_VALUE)
.addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jTextField13,
javax.swing.GroupLayout.DEFAULT_SIZE, 172,
.addGroup(jPanel1Layout.createParallelGroup(java Short.MAX_VALUE)))
x.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel11) .addGroup(javax.swing.GroupLayout.Alignment.TR
.addComponent(jLabel12)) AILING, jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(java .addGroup(javax.swing.GroupLayout.Alignment.LE
x.swing.GroupLayout.Alignment.LEADING) ADING, jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(java
.addGap(37, 37, 37) x.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createParallelGroup(java .addComponent(jLabel13)
x.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel14))
.addGroup(jPanel1Layout.createSequentialGroup() .addGap(14, 14, 14)
.addGap(23, 23, 23)
.addGroup(jPanel1Layout.createParallelGroup(java
.addGroup(jPanel1Layout.createParallelGroup(java x.swing.GroupLayout.Alignment.LEADING, false)
x.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField12)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jTextField9,
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 143,
javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)))
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18) .addGroup(javax.swing.GroupLayout.Alignment.LE
ADING, jPanel1Layout.createSequentialGroup()
.addComponent(jButton2,
javax.swing.GroupLayout.PREFERRED_SIZE, 93, .addGroup(jPanel1Layout.createParallelGroup(java
javax.swing.GroupLayout.PREFERRED_SIZE)) x.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel16)
.addGroup(jPanel1Layout.createParallelGroup(java .addComponent(jLabel15))
x.swing.GroupLayout.Alignment.TRAILING) .addGap(45, 45, 45)
.addComponent(jLabel19) .addGroup(jPanel1Layout.createParallelGroup(java
x.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel20))
.addGap(18, 18, 18) .addComponent(jTextField15)
.addGroup(jPanel1Layout.createParallelGroup(java .addComponent(jTextField16,
x.swing.GroupLayout.Alignment.TRAILING) javax.swing.GroupLayout.DEFAULT_SIZE, 143,
Short.MAX_VALUE))))
.addComponent(jTextField19,
javax.swing.GroupLayout.DEFAULT_SIZE, 167, .addPreferredGap(javax.swing.LayoutStyle.Compo
Short.MAX_VALUE) nentPlacement.RELATED, 10, Short.MAX_VALUE)))
.addGap(8, 8, 8))
.addComponent(jTextField18,
javax.swing.GroupLayout.Alignment.LEADING, .addGroup(javax.swing.GroupLayout.Alignment.TR
javax.swing.GroupLayout.DEFAULT_SIZE, 167, AILING, jPanel1Layout.createSequentialGroup()
Short.MAX_VALUE)))))
.addPreferredGap(javax.swing.LayoutStyle.Compo
.addGroup(jPanel1Layout.createSequentialGroup() nentPlacement.RELATED)
.addGap(74, 74, 74)
.addComponent(jLabel25))
.addGroup(jPanel1Layout.createParallelGroup(java .addGroup(jPanel1Layout.createParallelGroup(java
x.swing.GroupLayout.Alignment.BASELINE) x.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel12) .addComponent(jButton7)
.addComponent(jTextField11, .addComponent(jButton6))
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, .addPreferredGap(javax.swing.LayoutStyle.Compo
javax.swing.GroupLayout.PREFERRED_SIZE)) nentPlacement.RELATED)
.addGap(7, 7, 7))
.addGroup(jPanel1Layout.createParallelGroup(java bindingGroup.bind();
x.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel19) java.awt.Dimension screenSize =
.addComponent(jTextField18, java.awt.Toolkit.getDefaultToolkit().getScreenSize(
javax.swing.GroupLayout.PREFERRED_SIZE, );
javax.swing.GroupLayout.DEFAULT_SIZE, setBounds((screenSize.width-750)/2,
javax.swing.GroupLayout.PREFERRED_SIZE))) (screenSize.height-534)/2, 750, 534);
}// </editor-fold>
.addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.RELATED) private void
jButton2ActionPerformed(java.awt.event.ActionEv
.addGroup(jPanel1Layout.createParallelGroup(java ent evt) {
x.swing.GroupLayout.Alignment.BASELINE) // TODO add your handling code here:
.addComponent(jLabel20) dispose();
.addComponent(jTextField19, }
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, private void
javax.swing.GroupLayout.PREFERRED_SIZE)) jButton1ActionPerformed(java.awt.event.ActionEv
.addGap(18, 18, 18) ent evt) {
// TODO add your handling code here:
.addGroup(jPanel1Layout.createParallelGroup(java }
x.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1, private void
javax.swing.GroupLayout.PREFERRED_SIZE, 31, jButton8ActionPerformed(java.awt.event.ActionEv
javax.swing.GroupLayout.PREFERRED_SIZE) ent evt) {
.addComponent(jButton2, try {
javax.swing.GroupLayout.DEFAULT_SIZE, 31, rs.last();
Short.MAX_VALUE)))) if (rs.isLast()) {
.addContainerGap()) rs.last();
); }
displayRecord();
javax.swing.GroupLayout layout = new } catch (Exception ex) {
javax.swing.GroupLayout(getContentPane()); }
getContentPane().setLayout(layout); }
layout.setHorizontalGroup(
private void
layout.createParallelGroup(javax.swing.GroupLayo jButton6ActionPerformed(java.awt.event.ActionEv
ut.Alignment.LEADING) ent evt) {
.addGroup(layout.createSequentialGroup() try {
.addComponent(jPanel1, rs.previous();
javax.swing.GroupLayout.PREFERRED_SIZE, if (rs.isFirst()) {
javax.swing.GroupLayout.DEFAULT_SIZE, rs.first();
javax.swing.GroupLayout.PREFERRED_SIZE) }
jButton8.setFont(new jButton9.setFont(new
java.awt.Font("Tahoma", 0, 12)); java.awt.Font("Tahoma", 1, 11));
jButton8.setText("Last >>"); jButton9.setText("Close");
jButton8.addActionListener(new jButton9.addActionListener(new
java.awt.event.ActionListener() { java.awt.event.ActionListener() {
public void public void
actionPerformed(java.awt.event.ActionEvent evt) { actionPerformed(java.awt.event.ActionEvent evt) {
jButton8ActionPerformed(evt); jButton9ActionPerformed(evt);
} }
}); });
jTextField1.setEditable(false); jButton10.setText("Search");
jTextField1.setFont(new jButton10.addActionListener(new
java.awt.Font("Tahoma", 0, 12)); java.awt.event.ActionListener() {
public void
jTextField2.setEditable(false); actionPerformed(java.awt.event.ActionEvent evt) {
jTextField2.setFont(new jButton10ActionPerformed(evt);
java.awt.Font("Tahoma", 0, 12)); }
});
jTextField3.setEditable(false);
jTextField3.setFont(new javax.swing.GroupLayout jPanel1Layout = new
java.awt.Font("Tahoma", 0, 12)); javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jTextField4.setEditable(false); jPanel1Layout.setHorizontalGroup(
jTextField4.setFont(new
java.awt.Font("Tahoma", 0, 12)); jPanel1Layout.createParallelGroup(javax.swing.Gr
oupLayout.Alignment.LEADING)
jTextField5.setEditable(false);
.addGroup(jPanel1Layout.createParallelGroup(java .addGroup(jPanel1Layout.createParallelGroup(java
x.swing.GroupLayout.Alignment.TRAILING) x.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 194, .addGroup(jPanel1Layout.createParallelGroup(java
Short.MAX_VALUE) x.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField2,
javax.swing.GroupLayout.DEFAULT_SIZE, 194, .addGroup(jPanel1Layout.createSequentialGroup()
Short.MAX_VALUE) .addGap(32, 32, 32)
.addComponent(jTextField3,
javax.swing.GroupLayout.DEFAULT_SIZE, 194, .addGroup(jPanel1Layout.createParallelGroup(java
Short.MAX_VALUE)) x.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jTextField4,
javax.swing.GroupLayout.Alignment.TRAILING, .addGroup(jPanel1Layout.createSequentialGroup()
javax.swing.GroupLayout.PREFERRED_SIZE, 194,
javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel1Layout.createParallelGroup(java
x.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jButton1,
javax.swing.GroupLayout.DEFAULT_SIZE, 91,
Short.MAX_VALUE)
.addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jButton5,
javax.swing.GroupLayout.PREFERRED_SIZE, 91, .addGroup(jPanel1Layout.createParallelGroup(java
javax.swing.GroupLayout.PREFERRED_SIZE) x.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextField1,
.addPreferredGap(javax.swing.LayoutStyle.Compo javax.swing.GroupLayout.PREFERRED_SIZE,
nentPlacement.RELATED) javax.swing.GroupLayout.DEFAULT_SIZE,
.addComponent(jButton6))) javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2))
.addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.RELATED, 17, .addPreferredGap(javax.swing.LayoutStyle.Compo
javax.swing.GroupLayout.PREFERRED_SIZE)) nentPlacement.RELATED)
.addGroup(javax.swing.GroupLayout.Alignment.TR .addGroup(jPanel1Layout.createParallelGroup(java
AILING, jPanel1Layout.createSequentialGroup() x.swing.GroupLayout.Alignment.BASELINE)
.addGap(25, 25, 25) .addComponent(jLabel3)
.addComponent(jTextField2,
.addGroup(jPanel1Layout.createParallelGroup(java javax.swing.GroupLayout.PREFERRED_SIZE,
x.swing.GroupLayout.Alignment.TRAILING) javax.swing.GroupLayout.DEFAULT_SIZE,
.addComponent(jLabel12) javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jLabel11))
.addGap(18, 18, 18) .addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(java
x.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel1Layout.createParallelGroup(java
.addComponent(jTextField9, x.swing.GroupLayout.Alignment.BASELINE)
javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jTextField3,
.addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
javax.swing.GroupLayout.PREFERRED_SIZE)))) .addComponent(jLabel4))
.addGroup(jPanel1Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.Compo
.addGap(66, 66, 66) nentPlacement.RELATED)
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.Compo .addGroup(jPanel1Layout.createSequentialGroup()
nentPlacement.RELATED) .addGap(34, 34, 34)
.addComponent(jLabel10)
.addGroup(jPanel1Layout.createParallelGroup(java
x.swing.GroupLayout.Alignment.BASELINE) .addPreferredGap(javax.swing.LayoutStyle.Compo
.addComponent(jButton7) nentPlacement.UNRELATED)
.addComponent(jButton8))
.addGap(10, 10, 10) .addGroup(jPanel1Layout.createParallelGroup(java
x.swing.GroupLayout.Alignment.BASELINE)
.addGroup(jPanel1Layout.createParallelGroup(java .addComponent(jTextField8,
x.swing.GroupLayout.Alignment.BASELINE) javax.swing.GroupLayout.PREFERRED_SIZE,
.addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel11))
.addComponent(jButton2,
javax.swing.GroupLayout.PREFERRED_SIZE, 29, .addPreferredGap(javax.swing.LayoutStyle.Compo
javax.swing.GroupLayout.PREFERRED_SIZE)) nentPlacement.RELATED)
.addPreferredGap(javax.swing.LayoutStyle.Compo .addGroup(jPanel1Layout.createParallelGroup(java
nentPlacement.UNRELATED) x.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextField9,
.addGroup(jPanel1Layout.createParallelGroup(java javax.swing.GroupLayout.PREFERRED_SIZE,
x.swing.GroupLayout.Alignment.BASELINE) javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel12))
.addGroup(jPanel1Layout.createParallelGroup(java .addPreferredGap(javax.swing.LayoutStyle.Compo
x.swing.GroupLayout.Alignment.BASELINE) nentPlacement.RELATED)
.addComponent(jButton9) .addComponent(jPanel1,
.addComponent(jButton10))))) javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
.addGroup(javax.swing.GroupLayout.Alignment.TR javax.swing.GroupLayout.PREFERRED_SIZE)
AILING, jPanel1Layout.createSequentialGroup() .addContainerGap(343,
Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.Compo );
nentPlacement.RELATED, 138,
javax.swing.GroupLayout.PREFERRED_SIZE) javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(getContentPane());
.addGroup(jPanel1Layout.createParallelGroup(java getContentPane().setLayout(layout);
x.swing.GroupLayout.Alignment.BASELINE) layout.setHorizontalGroup(
.addComponent(jTextField6,
javax.swing.GroupLayout.PREFERRED_SIZE, layout.createParallelGroup(javax.swing.GroupLayo
javax.swing.GroupLayout.DEFAULT_SIZE, ut.Alignment.LEADING)
javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup()
.addComponent(jLabel6)) .addComponent(jPanel2,
.addGap(135, 135, 135))) javax.swing.GroupLayout.PREFERRED_SIZE,
.addContainerGap(44, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)) javax.swing.GroupLayout.PREFERRED_SIZE)
);
.addContainerGap(javax.swing.GroupLayout.DEFA
javax.swing.GroupLayout jPanel2Layout = new ULT_SIZE, Short.MAX_VALUE))
javax.swing.GroupLayout(jPanel2); );
jPanel2.setLayout(jPanel2Layout); layout.setVerticalGroup(
jPanel2Layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayo
jPanel2Layout.createParallelGroup(javax.swing.Gr ut.Alignment.LEADING)
oupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup()
.addComponent(jPanel2,
.addGroup(jPanel2Layout.createSequentialGroup() javax.swing.GroupLayout.PREFERRED_SIZE,
.addGap(49, 49, 49) javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createParallelGroup(java
x.swing.GroupLayout.Alignment.TRAILING, false) .addContainerGap(javax.swing.GroupLayout.DEFA
.addComponent(jPanel1, ULT_SIZE, Short.MAX_VALUE))
javax.swing.GroupLayout.Alignment.LEADING, );
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, bindingGroup.bind();
Short.MAX_VALUE)
.addComponent(jLabel1, java.awt.Dimension screenSize =
javax.swing.GroupLayout.Alignment.LEADING, java.awt.Toolkit.getDefaultToolkit().getScreenSize(
javax.swing.GroupLayout.PREFERRED_SIZE, 626, );
javax.swing.GroupLayout.PREFERRED_SIZE)) setBounds((screenSize.width-750)/2,
.addContainerGap(73, (screenSize.height-530)/2, 750, 530);
Short.MAX_VALUE)) }// </editor-fold>
); //FETCH THE VALUES FROM DATABASE TO TEXT
jPanel2Layout.setVerticalGroup( FIELDS AND TEXT AREA
public final void displayRecord(){
jPanel2Layout.createParallelGroup(javax.swing.Gr try
oupLayout.Alignment.LEADING) {
jTextField1.setText(rs.getString(1));
.addGroup(jPanel2Layout.createSequentialGroup() jTextField2.setText(rs.getString(2));
.addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(java
x.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
jTextField2.setFont(new jButton2.setFont(new
java.awt.Font("Tahoma", 0, 12)); java.awt.Font("Tahoma", 1, 12));
jButton2.setText("Cancel Booking");
jTextField4.setFont(new jButton2.addActionListener(new
java.awt.Font("Tahoma", 0, 12)); java.awt.event.ActionListener() {
public void
jTextField5.setFont(new actionPerformed(java.awt.event.ActionEvent evt) {
java.awt.Font("Tahoma", 0, 12)); jButton2ActionPerformed(evt);
}
jTextField6.setFont(new });
java.awt.Font("Tahoma", 0, 12));
jLabel1.setIcon(new
jButton5.setFont(new javax.swing.ImageIcon(getClass().getResource("/to
java.awt.Font("Tahoma", 0, 12)); p-aboutus.png"))); // NOI18N
jButton5.setText("First <<");
jButton5.addActionListener(new jButton9.setFont(new
java.awt.event.ActionListener() { java.awt.Font("Tahoma", 1, 11));
public void jButton9.setText("CLOSE");
actionPerformed(java.awt.event.ActionEvent evt) { jButton9.addActionListener(new
jButton5ActionPerformed(evt); java.awt.event.ActionListener() {
} public void
}); actionPerformed(java.awt.event.ActionEvent evt) {
jButton9ActionPerformed(evt);
}
.addGroup(jPanel1Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.Compo
.addContainerGap(57, Short.MAX_VALUE) nentPlacement.UNRELATED)
.addComponent(jButton6))
.addGroup(jPanel1Layout.createParallelGroup(java
x.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jButton7,
.addGroup(javax.swing.GroupLayout.Alignment.TR javax.swing.GroupLayout.PREFERRED_SIZE, 91,
AILING, jPanel1Layout.createSequentialGroup() javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel1Layout.createParallelGroup(java .addPreferredGap(javax.swing.LayoutStyle.Compo
x.swing.GroupLayout.Alignment.LEADING) nentPlacement.UNRELATED)
.addComponent(jButton8,
.addGroup(javax.swing.GroupLayout.Alignment.TR javax.swing.GroupLayout.PREFERRED_SIZE, 91,
AILING, jPanel1Layout.createSequentialGroup() javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jButton2,
.addGroup(jPanel1Layout.createParallelGroup(java javax.swing.GroupLayout.DEFAULT_SIZE,
x.swing.GroupLayout.Alignment.LEADING) javax.swing.GroupLayout.DEFAULT_SIZE,
.addComponent(jLabel6) Short.MAX_VALUE))
.addComponent(jLabel7) .addGap(103, 103, 103))
.addComponent(jLabel5))
.addGap(16, 16, 16)) .addGroup(javax.swing.GroupLayout.Alignment.TR
.addComponent(jLabel2) AILING, jPanel1Layout.createSequentialGroup()
.addComponent(jLabel3)) .addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 636,
.addGroup(jPanel1Layout.createParallelGroup(java javax.swing.GroupLayout.PREFERRED_SIZE)
x.swing.GroupLayout.Alignment.LEADING, false) .addGap(41, 41, 41))
.addComponent(jTextField6)
.addGroup(javax.swing.GroupLayout.Alignment.TR
.addGroup(javax.swing.GroupLayout.Alignment.TR AILING, jPanel1Layout.createSequentialGroup()
AILING, jPanel1Layout.createSequentialGroup() .addComponent(jButton9,
javax.swing.GroupLayout.PREFERRED_SIZE, 77,
.addPreferredGap(javax.swing.LayoutStyle.Compo javax.swing.GroupLayout.PREFERRED_SIZE)
nentPlacement.RELATED) .addGap(28, 28, 28))))
);
.addGroup(jPanel1Layout.createParallelGroup(java jPanel1Layout.setVerticalGroup(
x.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField2, jPanel1Layout.createParallelGroup(javax.swing.Gr
javax.swing.GroupLayout.Alignment.TRAILING) oupLayout.Alignment.LEADING)
.addComponent(jTextField4,
javax.swing.GroupLayout.Alignment.TRAILING, .addGroup(javax.swing.GroupLayout.Alignment.TR
javax.swing.GroupLayout.DEFAULT_SIZE, 182, AILING, jPanel1Layout.createSequentialGroup()
Short.MAX_VALUE) .addGap(23, 23, 23)
.addComponent(jTextField1, .addComponent(jLabel1,
javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 162,
javax.swing.GroupLayout.DEFAULT_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)
Short.MAX_VALUE)))
.addComponent(jTextField5))
.addGroup(jPanel1Layout.createParallelGroup(java bindingGroup.bind();
x.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel7)
jButton2.setFont(new
setDefaultCloseOperation(javax.swing.WindowCon java.awt.Font("Tahoma", 1, 14));
stants.EXIT_ON_CLOSE); jButton2.setText("Room Management");
setBounds(new java.awt.Rectangle(100, 100, jButton2.addActionListener(new
0, 0)); java.awt.event.ActionListener() {
setResizable(false); public void
actionPerformed(java.awt.event.ActionEvent evt) {
org.jdesktop.beansbinding.Binding binding = jButton2ActionPerformed(evt);
org.jdesktop.beansbinding.Bindings.createAutoBin }
ding(org.jdesktop.beansbinding.AutoBinding.Upda });
teStrategy.READ_WRITE, this,
org.jdesktop.beansbinding.ELProperty.create("Hot jButton5.setFont(new
el Reservation System || www.ezindagi.in ||"), java.awt.Font("Tahoma", 1, 14));
this, jButton5.setText("Visitor Management");
org.jdesktop.beansbinding.BeanProperty.create("ti jButton5.addActionListener(new
tle")); java.awt.event.ActionListener() {
bindingGroup.addBinding(binding); public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton6.setFont(new jPanel2Layout.createParallelGroup(javax.swing.Gr
java.awt.Font("Tahoma", 1, 14)); oupLayout.Alignment.LEADING)
jButton6.setText("Booking Management");
jButton6.addActionListener(new .addGroup(jPanel2Layout.createSequentialGroup()
java.awt.event.ActionListener() { .addContainerGap()
public void .addComponent(jLabel1)
actionPerformed(java.awt.event.ActionEvent evt) {
jButton6ActionPerformed(evt); .addPreferredGap(javax.swing.LayoutStyle.Compo
} nentPlacement.UNRELATED)
}); .addComponent(jButton3,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout.PREFERRED_SIZE)
javax.swing.GroupLayout(jPanel2); .addGap(18, 18, 18)
jPanel2.setLayout(jPanel2Layout); .addComponent(jButton6,
jPanel2Layout.setHorizontalGroup( javax.swing.GroupLayout.PREFERRED_SIZE, 33,
javax.swing.GroupLayout.PREFERRED_SIZE)
jPanel2Layout.createParallelGroup(javax.swing.Gr .addGap(18, 18, 18)
oupLayout.Alignment.LEADING) .addComponent(jButton2,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
.addGroup(jPanel2Layout.createSequentialGroup() javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(72, 72, 72) .addGap(18, 18, 18)
.addComponent(jLabel1) .addComponent(jButton1,
.addGap(80, 80, 80)) javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.Alignment.TR .addGap(18, 18, 18)
AILING, jPanel2Layout.createSequentialGroup() .addComponent(jButton5,
.addGap(177, 177, 177) javax.swing.GroupLayout.PREFERRED_SIZE, 35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createParallelGroup(java .addGap(18, 18, 18)
x.swing.GroupLayout.Alignment.TRAILING) .addComponent(jButton4,
.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 33,
javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE)
javax.swing.GroupLayout.DEFAULT_SIZE, 428, .addContainerGap(181,
Short.MAX_VALUE) Short.MAX_VALUE))
.addComponent(jButton5, );
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 428, javax.swing.GroupLayout layout = new
Short.MAX_VALUE) javax.swing.GroupLayout(getContentPane());
.addComponent(jButton1, getContentPane().setLayout(layout);
javax.swing.GroupLayout.Alignment.LEADING, layout.setHorizontalGroup(
javax.swing.GroupLayout.DEFAULT_SIZE, 428,
Short.MAX_VALUE)
Writtten by:
2. Oxford 12th IP
TEACHER REMARKS