Abhishek Pati
Abhishek Pati
Abhishek Pati
CATTERING system
Submitted in partial fulfilment of the requirements for the IT
PROJECT under CHSE, ODISHA
ABHISHEK PATI
Roll No: 393CA282
Regd. No : CA93S22299
+2 2ND YEAR SCIENCE
Page3
requirement of course study. This project is an original one and has not been
Signature :
Roll No. :
Authorised Signatory
Page3
CERTIFICATE
Place : CUTTACK
Page3
INTRODUCTION
information.
data needed.
OBJECTIVES
which is user friendly, simple, fast, and cost–effective. It deals with the
was done manually. The main function of the system is to register and store
the details of the customers and results and retrieve these details as and
Page3
Simultaneously if there is any changes to any data & items in the entire data
Software Specifications :
The software is designed under the following environment:
Tools : JDK_1.7,NetBeanIDE
Databases :MySQL
Page3
TABLE : CATTERING
COLUMNNAME DATATYPE SIZE
CATTERINGNAME CHAR 30
ITEM CHAR 30
COST CHAR 30
ADDRESS CHAR 30
DATE CHAR 30
QUALITY CHAR 30
Page3
User Interface
Page3
Reports & Output Forms:
Page3
Codes :
import java.awt.BorderLayout;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import java.sql.DriverManager;
import java.sql.*;
public HOTEL() {
initComponents();
String a1,a2,a3,a4,a5,a6;
addWindowListener(new java.awt.event.WindowAdapter() {
exitForm(evt);
});
add(jLayeredPane1, java.awt.BorderLayout.NORTH);
add(jLayeredPane2, java.awt.BorderLayout.WEST);
jLayeredPane3.setBorder(javax.swing.BorderFactory.createCompoundBorder(null,
javax.swing.BorderFactory.createCompoundBorder(null,
javax.swing.BorderFactory.createEtchedBorder(new java.awt.Color(204, 0, 153), null))));
jLabel1.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new
java.awt.Color(204, 0, 204), new java.awt.Color(0, 153, 153), new java.awt.Color(51, 255,
51), new java.awt.Color(0, 51, 255)));
jLayeredPane3.add(jLabel1);
jButton1.setText("ADD");
jButton1.addActionListener(new java.awt.event.ActionListener() {
jButton1ActionPerformed(evt);
});
jLayeredPane3.add(jButton1);
jButton2.setText("SHOW");
jButton2.addActionListener(new java.awt.event.ActionListener() {
jButton2ActionPerformed(evt);
});
Page3
jLayeredPane3.add(jButton2);
jLabel2.setForeground(java.awt.Color.green);
jLabel2.setText("ROOMNO");
jLayeredPane3.add(jLabel2);
jLabel2.setBounds(40, 50, 100, 17);
jLabel3.setForeground(java.awt.Color.green);
jLabel3.setText("NAME");
jLayeredPane3.add(jLabel3);
jLabel4.setForeground(java.awt.Color.green);
jLabel4.setText("PRICE");
jLayeredPane3.add(jLabel4);
jLabel5.setForeground(java.awt.Color.green);
jLabel5.setText("CONTACT NO");
jLayeredPane3.add(jLabel5);
jLabel6.setForeground(java.awt.Color.green);
jLabel6.setText("EMAIL");
jLayeredPane3.add(jLabel6);
jLabel7.setForeground(java.awt.Color.green);
jLabel7.setText("DATE");
jLayeredPane3.add(jLabel7);
jLayeredPane3.add(jTextField1);
jLayeredPane3.add(jTextField2);
jLayeredPane3.add(jTextField3);
jLayeredPane3.add(jTextField4);
jLayeredPane3.add(jTextField5);
Page3
jLayeredPane3.add(jTextField6);
pack();
}// </editor-fold>
System.exit(0);
try
Class.forName(myDriver);
a1=jTextField1.getText();
a2=jTextField2.getText();
a3=jTextField3.getText();
a4=jTextField4.getText();
a5=jTextField5.getText();
a6=jTextField6.getText();
a7=jTextField7.getText();
Page3
// if you only need a few columns, specify them by name instead of using "*"
Statement st = conn.createStatement();
// execute the query, and get a java resultset
st.executeUpdate(query);
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jTextField5.setText("");
jTextField6.setText("");
jTextField7.setText("");
st.close();
catch (Exception e)
System.err.println(e.getMessage());
JFrame frame1;
JTable table;
//hsa
frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame1.setLayout(new BorderLayout());
table.setModel(model);
table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
table.setFillsViewportHeight(true);
scroll.setHorizontalScrollBarPolicy(
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scroll.setVerticalScrollBarPolicy(
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
try
Class.forName(myDriver);
PreparedStatement ps = conn.prepareStatement(sql);
ResultSet rs = ps.executeQuery();
while (rs.next())
String a = rs.getString("CATTERINGNAME");
Page3
String b=rs.getString("ITEM");
String c = rs.getString("COST");
String d=rs.getString("CONTACT");
String e = rs.getString("ADDR");
String f=rs.getString("DATE");
String g=rs.getString("QUALITY");
model.addRow(new Object[]{ a,b,c,d,e,f,g});
// st.close();
catch(Exception ex)
JOptionPane.showMessageDialog(null, ex.getMessage(),"Error",
JOptionPane.ERROR_MESSAGE);
frame1.add(scroll);
frame1.setVisible(true);
frame1.setSize(400,300);
java.awt.EventQueue.invokeLater(new Runnable() {
new HOTEL().setVisible(true);
});
Page3
BIBLIOGRAPHY
The following books have been referred during the preparation of this
project.
Page3