├── README.md
├── ps1.png
├── ps2.png
└── src
├── Admin_Settings.form
├── Admin_Settings.java
├── Login.form
├── Login.java
├── Parking.form
├── Parking.java
├── Record.form
├── Record.java
├── Welcome.form
└── Welcome.java
/README.md:
--------------------------------------------------------------------------------
1 | # Java-Parking-System
2 | Java DBMS Project of Parking System Management
3 |
4 | Contributors- [Rehan Shivani](https://github.com/Teriyakiboy98)
5 |
6 |  
7 | ---
8 | ## Introduction
9 |
10 | 
11 |
12 |
13 | This is a Parking management system created in java.
14 | It can Charge and assign parking space to the vehicles entering the parkig lot and also keep their timely Record.
15 |
16 | 
17 |
18 |
19 | 
20 |
21 | It is designed for the parking manager to be controlled by but administrator of the parking system can also control this in order to seek any flaw by the manager.
22 |
--------------------------------------------------------------------------------
/ps1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyrunner360/Java-Parking-System/8f692ed563fca837907f1022e7f242d7da4dfa70/ps1.png
--------------------------------------------------------------------------------
/ps2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyrunner360/Java-Parking-System/8f692ed563fca837907f1022e7f242d7da4dfa70/ps2.png
--------------------------------------------------------------------------------
/src/Admin_Settings.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
160 |
--------------------------------------------------------------------------------
/src/Admin_Settings.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 |
7 | /**
8 | *
9 | * @author Skyrunner
10 | */
11 | public class Admin_Settings extends javax.swing.JFrame {
12 |
13 | /**
14 | * Creates new form Admin_Settings
15 | */
16 | public Admin_Settings() {
17 | initComponents();
18 | }
19 |
20 | /**
21 | * This method is called from within the constructor to initialize the form.
22 | * WARNING: Do NOT modify this code. The content of this method is always
23 | * regenerated by the Form Editor.
24 | */
25 | @SuppressWarnings("unchecked")
26 | // //GEN-BEGIN:initComponents
27 | private void initComponents() {
28 |
29 | jLabel1 = new javax.swing.JLabel();
30 | jTextField1 = new javax.swing.JTextField();
31 | jLabel2 = new javax.swing.JLabel();
32 | jTextField2 = new javax.swing.JTextField();
33 | jLabel3 = new javax.swing.JLabel();
34 | jTextField3 = new javax.swing.JTextField();
35 | jLabel4 = new javax.swing.JLabel();
36 | jTextField4 = new javax.swing.JTextField();
37 | jButton1 = new javax.swing.JButton();
38 | jButton2 = new javax.swing.JButton();
39 |
40 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
41 | setTitle("Parking Management System");
42 |
43 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
44 | jLabel1.setText("Current Base Payment :");
45 |
46 | jTextField1.setEditable(false);
47 | jTextField1.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
48 | jTextField1.setText("60 Rs");
49 |
50 | jLabel2.setText(" Change Base Payment :");
51 |
52 | jLabel3.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
53 | jLabel3.setText("Total Parking Spots Available :");
54 |
55 | jTextField3.setEditable(false);
56 | jTextField3.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
57 | jTextField3.setText("200");
58 |
59 | jLabel4.setText("Change Total Parking Spots :");
60 |
61 | jButton1.setText("Change");
62 |
63 | jButton2.setText("Back");
64 | jButton2.addActionListener(new java.awt.event.ActionListener() {
65 | public void actionPerformed(java.awt.event.ActionEvent evt) {
66 | jButton2ActionPerformed(evt);
67 | }
68 | });
69 |
70 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
71 | getContentPane().setLayout(layout);
72 | layout.setHorizontalGroup(
73 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
74 | .addGroup(layout.createSequentialGroup()
75 | .addGap(37, 37, 37)
76 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
77 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
78 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
79 | .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)
80 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
81 | .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))
82 | .addGroup(layout.createSequentialGroup()
83 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
84 | .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
85 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
86 | .addGap(83, 83, 83)
87 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
88 | .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
89 | .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)))
90 | .addGroup(layout.createSequentialGroup()
91 | .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)
92 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
93 | .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)))
94 | .addGroup(layout.createSequentialGroup()
95 | .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
96 | .addGap(142, 142, 142)
97 | .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)))
98 | .addContainerGap(20, Short.MAX_VALUE))
99 | );
100 | layout.setVerticalGroup(
101 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
102 | .addGroup(layout.createSequentialGroup()
103 | .addGap(30, 30, 30)
104 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
105 | .addComponent(jLabel1)
106 | .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
107 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
108 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
109 | .addComponent(jLabel2)
110 | .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
111 | .addGap(34, 34, 34)
112 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
113 | .addComponent(jLabel3)
114 | .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
115 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
116 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
117 | .addComponent(jLabel4)
118 | .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
119 | .addGap(56, 56, 56)
120 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
121 | .addComponent(jButton1)
122 | .addComponent(jButton2))
123 | .addContainerGap(31, Short.MAX_VALUE))
124 | );
125 |
126 | pack();
127 | }// //GEN-END:initComponents
128 |
129 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
130 | // TODO add your handling code here:
131 | Welcome w = new Welcome();
132 | w.setVisible(true);
133 | this.dispose();
134 |
135 | }//GEN-LAST:event_jButton2ActionPerformed
136 |
137 | /**
138 | * @param args the command line arguments
139 | */
140 | public static void main(String args[]) {
141 | /* Set the Nimbus look and feel */
142 | //
143 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
144 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
145 | */
146 | try {
147 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
148 | if ("Nimbus".equals(info.getName())) {
149 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
150 | break;
151 | }
152 | }
153 | } catch (ClassNotFoundException ex) {
154 | java.util.logging.Logger.getLogger(Admin_Settings.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
155 | } catch (InstantiationException ex) {
156 | java.util.logging.Logger.getLogger(Admin_Settings.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
157 | } catch (IllegalAccessException ex) {
158 | java.util.logging.Logger.getLogger(Admin_Settings.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
159 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
160 | java.util.logging.Logger.getLogger(Admin_Settings.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
161 | }
162 | //
163 |
164 | /* Create and display the form */
165 | java.awt.EventQueue.invokeLater(new Runnable() {
166 | public void run() {
167 | new Admin_Settings().setVisible(true);
168 | }
169 | });
170 | }
171 |
172 | // Variables declaration - do not modify//GEN-BEGIN:variables
173 | private javax.swing.JButton jButton1;
174 | private javax.swing.JButton jButton2;
175 | private javax.swing.JLabel jLabel1;
176 | private javax.swing.JLabel jLabel2;
177 | private javax.swing.JLabel jLabel3;
178 | private javax.swing.JLabel jLabel4;
179 | private javax.swing.JTextField jTextField1;
180 | private javax.swing.JTextField jTextField2;
181 | private javax.swing.JTextField jTextField3;
182 | private javax.swing.JTextField jTextField4;
183 | // End of variables declaration//GEN-END:variables
184 | }
185 |
--------------------------------------------------------------------------------
/src/Login.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
148 |
--------------------------------------------------------------------------------
/src/Login.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 | import javax.swing.JOptionPane;
7 | /**
8 | *
9 | * @author Skyrunner
10 | */
11 | public class Login extends javax.swing.JFrame {
12 |
13 | /**
14 | * Creates new form Login
15 | */
16 | public Login() {
17 | initComponents();
18 | }
19 |
20 | /**
21 | * This method is called from within the constructor to initialize the form.
22 | * WARNING: Do NOT modify this code. The content of this method is always
23 | * regenerated by the Form Editor.
24 | */
25 | @SuppressWarnings("unchecked")
26 | // //GEN-BEGIN:initComponents
27 | private void initComponents() {
28 |
29 | jPasswordField1 = new javax.swing.JPasswordField();
30 | jLabel1 = new javax.swing.JLabel();
31 | jLabel2 = new javax.swing.JLabel();
32 | jButton2 = new javax.swing.JButton();
33 | jButton1 = new javax.swing.JButton();
34 |
35 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
36 |
37 | jPasswordField1.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
38 |
39 | jLabel1.setBackground(new java.awt.Color(255, 255, 255));
40 | jLabel1.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
41 | jLabel1.setForeground(new java.awt.Color(0, 0, 0));
42 | jLabel1.setText("Log In");
43 |
44 | jLabel2.setBackground(new java.awt.Color(255, 255, 255));
45 | jLabel2.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
46 | jLabel2.setForeground(new java.awt.Color(0, 0, 0));
47 | jLabel2.setText("Enter Password");
48 |
49 | jButton2.setBackground(new java.awt.Color(255, 255, 255));
50 | jButton2.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
51 | jButton2.setText("Exit");
52 | jButton2.setAutoscrolls(true);
53 | jButton2.setBorder(new javax.swing.border.MatteBorder(null));
54 | jButton2.addActionListener(new java.awt.event.ActionListener() {
55 | public void actionPerformed(java.awt.event.ActionEvent evt) {
56 | jButton2ActionPerformed(evt);
57 | }
58 | });
59 |
60 | jButton1.setBackground(new java.awt.Color(255, 255, 255));
61 | jButton1.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
62 | jButton1.setText("Login");
63 | jButton1.setAutoscrolls(true);
64 | jButton1.setBorder(new javax.swing.border.MatteBorder(null));
65 | jButton1.addActionListener(new java.awt.event.ActionListener() {
66 | public void actionPerformed(java.awt.event.ActionEvent evt) {
67 | jButton1ActionPerformed(evt);
68 | }
69 | });
70 |
71 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
72 | getContentPane().setLayout(layout);
73 | layout.setHorizontalGroup(
74 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
75 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
76 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
77 | .addComponent(jLabel1)
78 | .addGap(235, 235, 235))
79 | .addGroup(layout.createSequentialGroup()
80 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
81 | .addGroup(layout.createSequentialGroup()
82 | .addGap(42, 42, 42)
83 | .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
84 | .addGap(261, 261, 261)
85 | .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
86 | .addGroup(layout.createSequentialGroup()
87 | .addGap(70, 70, 70)
88 | .addComponent(jLabel2)
89 | .addGap(27, 27, 27)
90 | .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)))
91 | .addContainerGap(32, Short.MAX_VALUE))
92 | );
93 | layout.setVerticalGroup(
94 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
95 | .addGroup(layout.createSequentialGroup()
96 | .addContainerGap()
97 | .addComponent(jLabel1)
98 | .addGap(120, 120, 120)
99 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
100 | .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
101 | .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
102 | .addGap(112, 112, 112)
103 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
104 | .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
105 | .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
106 | .addContainerGap(66, Short.MAX_VALUE))
107 | );
108 |
109 | pack();
110 | }// //GEN-END:initComponents
111 |
112 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
113 | // TODO add your handling code here:
114 | int a;
115 | Login l = new Login();
116 | a=JOptionPane.showConfirmDialog(null, "Sure TO Exit?");
117 | if (a==0)
118 | {System.exit(0);}
119 | else
120 | l.setVisible(true);
121 | this.dispose();
122 | }//GEN-LAST:event_jButton2ActionPerformed
123 |
124 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
125 | // TODO add your handling code here:
126 | String b;
127 | b= new String(jPasswordField1.getPassword());
128 | if ("Rishi".equals(b))
129 | {this.dispose();
130 | Welcome n = new Welcome();
131 | n.setVisible(true);}
132 | else
133 | JOptionPane.showMessageDialog(null,"Invalid Password");
134 | }//GEN-LAST:event_jButton1ActionPerformed
135 |
136 | /**
137 | * @param args the command line arguments
138 | */
139 | public static void main(String args[]) {
140 | /* Set the Nimbus look and feel */
141 | //
142 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
143 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
144 | */
145 | try {
146 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
147 | if ("Nimbus".equals(info.getName())) {
148 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
149 | break;
150 | }
151 | }
152 | } catch (ClassNotFoundException ex) {
153 | java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
154 | } catch (InstantiationException ex) {
155 | java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
156 | } catch (IllegalAccessException ex) {
157 | java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
158 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
159 | java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
160 | }
161 | //
162 |
163 | /* Create and display the form */
164 | java.awt.EventQueue.invokeLater(new Runnable() {
165 | public void run() {
166 | new Login().setVisible(true);
167 | }
168 | });
169 | }
170 |
171 | // Variables declaration - do not modify//GEN-BEGIN:variables
172 | private javax.swing.JButton jButton1;
173 | private javax.swing.JButton jButton2;
174 | private javax.swing.JLabel jLabel1;
175 | private javax.swing.JLabel jLabel2;
176 | private javax.swing.JPasswordField jPasswordField1;
177 | // End of variables declaration//GEN-END:variables
178 | }
179 |
--------------------------------------------------------------------------------
/src/Parking.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
476 |
--------------------------------------------------------------------------------
/src/Parking.java:
--------------------------------------------------------------------------------
1 |
2 | import javax.swing.JOptionPane;
3 | import java.sql.*;
4 | /*
5 | * To change this license header, choose License Headers in Project Properties.
6 | * To change this template file, choose Tools | Templates
7 | * and open the template in the editor.
8 | */
9 | import java.time.*;
10 | /**
11 | *
12 | * @author Skyrunner
13 | */
14 | public class Parking extends javax.swing.JFrame {
15 |
16 | /**
17 | * Creates new form Parking
18 | */
19 | public Parking() {
20 | initComponents();
21 | }
22 |
23 | /**
24 | * This method is called from within the constructor to initialize the form.
25 | * WARNING: Do NOT modify this code. The content of this method is always
26 | * regenerated by the Form Editor.
27 | */
28 | @SuppressWarnings("unchecked")
29 | // //GEN-BEGIN:initComponents
30 | private void initComponents() {
31 |
32 | buttonGroup1 = new javax.swing.ButtonGroup();
33 | jPanel4 = new javax.swing.JPanel();
34 | jButton5 = new javax.swing.JButton();
35 | jButton4 = new javax.swing.JButton();
36 | jButton8 = new javax.swing.JButton();
37 | jPanel3 = new javax.swing.JPanel();
38 | jLabel6 = new javax.swing.JLabel();
39 | jButton6 = new javax.swing.JButton();
40 | jButton1 = new javax.swing.JButton();
41 | LP_No = new javax.swing.JTextField();
42 | jRadioButton2 = new javax.swing.JRadioButton();
43 | jRadioButton1 = new javax.swing.JRadioButton();
44 | jLabel5 = new javax.swing.JLabel();
45 | jButton7 = new javax.swing.JButton();
46 | Arr_T = new javax.swing.JTextField();
47 | jButton2 = new javax.swing.JButton();
48 | jPanel2 = new javax.swing.JPanel();
49 | jLabel9 = new javax.swing.JLabel();
50 | jButton3 = new javax.swing.JButton();
51 | Dep_T = new javax.swing.JTextField();
52 | Tot_AP = new javax.swing.JTextField();
53 | jLabel7 = new javax.swing.JLabel();
54 | jPanel1 = new javax.swing.JPanel();
55 | jLabel3 = new javax.swing.JLabel();
56 | jLabel1 = new javax.swing.JLabel();
57 | jLabel2 = new javax.swing.JLabel();
58 | jTextField2 = new javax.swing.JTextField();
59 | jTextField3 = new javax.swing.JTextField();
60 | jLabel4 = new javax.swing.JLabel();
61 | jTextField1 = new javax.swing.JTextField();
62 | jTextField4 = new javax.swing.JTextField();
63 | jLabel8 = new javax.swing.JLabel();
64 | jTextField8 = new javax.swing.JTextField();
65 |
66 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
67 | setTitle("Parking Management System");
68 |
69 | jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Parking"));
70 | jPanel4.addFocusListener(new java.awt.event.FocusAdapter() {
71 | public void focusGained(java.awt.event.FocusEvent evt) {
72 | jPanel4FocusGained(evt);
73 | }
74 | });
75 |
76 | jButton5.setText("Back");
77 | jButton5.addActionListener(new java.awt.event.ActionListener() {
78 | public void actionPerformed(java.awt.event.ActionEvent evt) {
79 | jButton5ActionPerformed(evt);
80 | }
81 | });
82 |
83 | jButton4.setText("Print Bill");
84 | jButton4.addActionListener(new java.awt.event.ActionListener() {
85 | public void actionPerformed(java.awt.event.ActionEvent evt) {
86 | jButton4ActionPerformed(evt);
87 | }
88 | });
89 |
90 | jButton8.setText("Records");
91 | jButton8.addActionListener(new java.awt.event.ActionListener() {
92 | public void actionPerformed(java.awt.event.ActionEvent evt) {
93 | jButton8ActionPerformed(evt);
94 | }
95 | });
96 |
97 | jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Arrival"));
98 |
99 | jLabel6.setText("Arrival Time :");
100 |
101 | jButton6.setText("Search and Display");
102 | jButton6.addActionListener(new java.awt.event.ActionListener() {
103 | public void actionPerformed(java.awt.event.ActionEvent evt) {
104 | jButton6ActionPerformed(evt);
105 | }
106 | });
107 |
108 | jButton1.setText("Set From System");
109 | jButton1.addActionListener(new java.awt.event.ActionListener() {
110 | public void actionPerformed(java.awt.event.ActionEvent evt) {
111 | jButton1ActionPerformed(evt);
112 | }
113 | });
114 |
115 | buttonGroup1.add(jRadioButton2);
116 | jRadioButton2.setText("Don't Include Base Payment");
117 |
118 | buttonGroup1.add(jRadioButton1);
119 | jRadioButton1.setText("Include Base Payment");
120 |
121 | jLabel5.setText("License Plate Number :");
122 |
123 | jButton7.setText("Proceed To Parking");
124 | jButton7.addActionListener(new java.awt.event.ActionListener() {
125 | public void actionPerformed(java.awt.event.ActionEvent evt) {
126 | jButton7ActionPerformed(evt);
127 | }
128 | });
129 |
130 | javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
131 | jPanel3.setLayout(jPanel3Layout);
132 | jPanel3Layout.setHorizontalGroup(
133 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
134 | .addGroup(jPanel3Layout.createSequentialGroup()
135 | .addContainerGap()
136 | .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
137 | .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
138 | .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE))
139 | .addGap(50, 50, 50)
140 | .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
141 | .addGroup(jPanel3Layout.createSequentialGroup()
142 | .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
143 | .addComponent(LP_No)
144 | .addComponent(Arr_T, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE))
145 | .addGap(18, 18, 18)
146 | .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
147 | .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
148 | .addComponent(jButton6)))
149 | .addComponent(jButton7)
150 | .addComponent(jRadioButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)
151 | .addComponent(jRadioButton2))
152 | .addContainerGap())
153 | );
154 | jPanel3Layout.setVerticalGroup(
155 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
156 | .addGroup(jPanel3Layout.createSequentialGroup()
157 | .addContainerGap()
158 | .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
159 | .addComponent(jLabel5)
160 | .addComponent(LP_No, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
161 | .addComponent(jButton6))
162 | .addGap(18, 18, 18)
163 | .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
164 | .addComponent(jLabel6)
165 | .addComponent(Arr_T, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
166 | .addComponent(jButton1))
167 | .addGap(29, 29, 29)
168 | .addComponent(jRadioButton1)
169 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
170 | .addComponent(jRadioButton2)
171 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
172 | .addComponent(jButton7))
173 | );
174 |
175 | jButton2.setText("Reset");
176 | jButton2.addActionListener(new java.awt.event.ActionListener() {
177 | public void actionPerformed(java.awt.event.ActionEvent evt) {
178 | jButton2ActionPerformed(evt);
179 | }
180 | });
181 |
182 | jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Departure"));
183 |
184 | jLabel9.setText("Total Amount Payable :");
185 |
186 | jButton3.setText("Set From System");
187 | jButton3.addActionListener(new java.awt.event.ActionListener() {
188 | public void actionPerformed(java.awt.event.ActionEvent evt) {
189 | jButton3ActionPerformed(evt);
190 | }
191 | });
192 |
193 | Tot_AP.setEditable(false);
194 |
195 | jLabel7.setText("Departure Time :");
196 |
197 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
198 | jPanel2.setLayout(jPanel2Layout);
199 | jPanel2Layout.setHorizontalGroup(
200 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
201 | .addGroup(jPanel2Layout.createSequentialGroup()
202 | .addContainerGap()
203 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
204 | .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
205 | .addComponent(jLabel9))
206 | .addGap(50, 50, 50)
207 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
208 | .addComponent(Dep_T)
209 | .addComponent(Tot_AP, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE))
210 | .addGap(18, 18, 18)
211 | .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 119, Short.MAX_VALUE)
212 | .addContainerGap())
213 | );
214 | jPanel2Layout.setVerticalGroup(
215 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
216 | .addGroup(jPanel2Layout.createSequentialGroup()
217 | .addContainerGap()
218 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
219 | .addComponent(jLabel7)
220 | .addComponent(Dep_T, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
221 | .addComponent(jButton3))
222 | .addGap(18, 18, 18)
223 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
224 | .addComponent(jLabel9)
225 | .addComponent(Tot_AP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
226 | .addContainerGap())
227 | );
228 |
229 | jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Information"));
230 |
231 | jLabel3.setText("Parking Spots Available :");
232 |
233 | jLabel1.setText("Parking Spots Remaining :");
234 |
235 | jLabel2.setText("Parking Spot Assigned :");
236 |
237 | jTextField2.setEditable(false);
238 | jTextField2.setText("200");
239 |
240 | jTextField3.setEditable(false);
241 |
242 | jLabel4.setText("Customer ID :");
243 |
244 | jTextField1.setEditable(false);
245 |
246 | jTextField4.setEditable(false);
247 |
248 | jLabel8.setText("Base Payment :");
249 |
250 | jTextField8.setEditable(false);
251 | jTextField8.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
252 | jTextField8.setText("60 Rs");
253 |
254 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
255 | jPanel1.setLayout(jPanel1Layout);
256 | jPanel1Layout.setHorizontalGroup(
257 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
258 | .addGroup(jPanel1Layout.createSequentialGroup()
259 | .addContainerGap()
260 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
261 | .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
262 | .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
263 | .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
264 | .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
265 | .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
266 | .addGap(18, 18, 18)
267 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
268 | .addComponent(jTextField2)
269 | .addComponent(jTextField3)
270 | .addComponent(jTextField1)
271 | .addComponent(jTextField4)
272 | .addComponent(jTextField8, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE))
273 | .addContainerGap())
274 | );
275 | jPanel1Layout.setVerticalGroup(
276 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
277 | .addGroup(jPanel1Layout.createSequentialGroup()
278 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
279 | .addComponent(jLabel8)
280 | .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
281 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
282 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
283 | .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
284 | .addComponent(jLabel3))
285 | .addGap(18, 18, 18)
286 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
287 | .addComponent(jLabel1)
288 | .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
289 | .addGap(18, 18, 18)
290 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
291 | .addComponent(jLabel2)
292 | .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
293 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
294 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
295 | .addComponent(jLabel4)
296 | .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
297 | .addContainerGap(33, Short.MAX_VALUE))
298 | );
299 |
300 | javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
301 | jPanel4.setLayout(jPanel4Layout);
302 | jPanel4Layout.setHorizontalGroup(
303 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
304 | .addGroup(jPanel4Layout.createSequentialGroup()
305 | .addContainerGap()
306 | .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
307 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
308 | .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
309 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
310 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
311 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
312 | .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
313 | .addGroup(jPanel4Layout.createSequentialGroup()
314 | .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
315 | .addGap(82, 82, 82))
316 | .addGroup(jPanel4Layout.createSequentialGroup()
317 | .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
318 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
319 | .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
320 | .addGap(128, 128, 128)))
321 | .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
322 | .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
323 | .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))
324 | .addGap(66, 66, 66)))
325 | .addContainerGap())
326 | );
327 | jPanel4Layout.setVerticalGroup(
328 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
329 | .addGroup(jPanel4Layout.createSequentialGroup()
330 | .addContainerGap()
331 | .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
332 | .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
333 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
334 | .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
335 | .addGroup(jPanel4Layout.createSequentialGroup()
336 | .addGap(20, 20, 20)
337 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
338 | .addGroup(jPanel4Layout.createSequentialGroup()
339 | .addGap(47, 47, 47)
340 | .addComponent(jButton2)))
341 | .addGap(18, 18, 18)
342 | .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
343 | .addComponent(jButton5)
344 | .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
345 | .addComponent(jButton8)
346 | .addComponent(jButton4)))
347 | .addContainerGap(43, Short.MAX_VALUE))
348 | );
349 |
350 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
351 | getContentPane().setLayout(layout);
352 | layout.setHorizontalGroup(
353 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
354 | .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
355 | );
356 | layout.setVerticalGroup(
357 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
358 | .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
359 | );
360 |
361 | pack();
362 | }// //GEN-END:initComponents
363 |
364 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
365 | // TODO add your handling code here:
366 | Arr_T.setText(java.time.LocalTime.now() + "");
367 |
368 | }//GEN-LAST:event_jButton1ActionPerformed
369 |
370 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
371 | // TODO add your handling code here:
372 | LP_No.setText("");
373 | Arr_T.setText("");
374 | jRadioButton1.setSelected(true);
375 | Dep_T.setText("");
376 | Tot_AP.setText("");
377 | jTextField1.setText("");
378 | jTextField4.setText("");
379 | }//GEN-LAST:event_jButton2ActionPerformed
380 |
381 | private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
382 | // TODO add your handling code here:
383 | Record r = new Record();
384 | r.setVisible(true);
385 | this.dispose();
386 | }//GEN-LAST:event_jButton8ActionPerformed
387 |
388 | private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
389 | // TODO add your handling code here:
390 | Welcome w = new Welcome();
391 | w.setVisible(true);
392 | this.dispose();
393 | }//GEN-LAST:event_jButton5ActionPerformed
394 |
395 | private void jPanel4FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jPanel4FocusGained
396 |
397 |
398 | }//GEN-LAST:event_jPanel4FocusGained
399 |
400 | private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
401 | // TODO add your handling code here:
402 | Dep_T.setText(java.time.LocalTime.now() + "");
403 | }//GEN-LAST:event_jButton3ActionPerformed
404 |
405 | private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
406 | // TODO add your handling code here:
407 | JOptionPane.showMessageDialog(null,"Data Saved. Proceed to Parking");
408 | }//GEN-LAST:event_jButton7ActionPerformed
409 |
410 | private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
411 | // TODO add your handling code here:
412 | JOptionPane.showMessageDialog(null, "Printing Bill now. Please Wait!");
413 | }//GEN-LAST:event_jButton4ActionPerformed
414 |
415 | private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
416 | // TODO add your handling code here:
417 | try{
418 | String lp=LP_No.getText();
419 | Class.forName("java.sql.Driver");
420 | Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/parkingsystem","root","root");
421 | Statement st=con.createStatement();
422 | ResultSet rs=st.executeQuery("select spot.S_date,spot.Sp_ID,spot.Available from spot inner join customer on customer.Cust_ID=spot.Sp_ID where Lise_No= '"+lp+"';");
423 | while (rs.next())
424 | {
425 | jTextField3.setText(rs.getInt("Available")+"");
426 | jTextField1.setText(rs.getInt("Sp_ID")+"");
427 | jTextField4.setText(rs.getInt("Cust_ID")+"");
428 | }
429 | }
430 | catch(Exception ex)
431 | {
432 | JOptionPane.showMessageDialog(null,ex.getMessage());
433 | }
434 | }//GEN-LAST:event_jButton6ActionPerformed
435 |
436 | /**
437 | * @param args the command line arguments
438 | */
439 | public static void main(String args[]) {
440 | /* Set the Nimbus look and feel */
441 | //
442 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
443 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
444 | */
445 | try {
446 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
447 | if ("Nimbus".equals(info.getName())) {
448 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
449 | break;
450 | }
451 | }
452 | } catch (ClassNotFoundException ex) {
453 | java.util.logging.Logger.getLogger(Parking.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
454 | } catch (InstantiationException ex) {
455 | java.util.logging.Logger.getLogger(Parking.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
456 | } catch (IllegalAccessException ex) {
457 | java.util.logging.Logger.getLogger(Parking.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
458 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
459 | java.util.logging.Logger.getLogger(Parking.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
460 | }
461 | //
462 |
463 | /* Create and display the form */
464 | java.awt.EventQueue.invokeLater(new Runnable() {
465 | public void run() {
466 | new Parking().setVisible(true);
467 | }
468 | });
469 | }
470 |
471 | // Variables declaration - do not modify//GEN-BEGIN:variables
472 | private javax.swing.JTextField Arr_T;
473 | private javax.swing.JTextField Dep_T;
474 | private javax.swing.JTextField LP_No;
475 | private javax.swing.JTextField Tot_AP;
476 | private javax.swing.ButtonGroup buttonGroup1;
477 | private javax.swing.JButton jButton1;
478 | private javax.swing.JButton jButton2;
479 | private javax.swing.JButton jButton3;
480 | private javax.swing.JButton jButton4;
481 | private javax.swing.JButton jButton5;
482 | private javax.swing.JButton jButton6;
483 | private javax.swing.JButton jButton7;
484 | private javax.swing.JButton jButton8;
485 | private javax.swing.JLabel jLabel1;
486 | private javax.swing.JLabel jLabel2;
487 | private javax.swing.JLabel jLabel3;
488 | private javax.swing.JLabel jLabel4;
489 | private javax.swing.JLabel jLabel5;
490 | private javax.swing.JLabel jLabel6;
491 | private javax.swing.JLabel jLabel7;
492 | private javax.swing.JLabel jLabel8;
493 | private javax.swing.JLabel jLabel9;
494 | private javax.swing.JPanel jPanel1;
495 | private javax.swing.JPanel jPanel2;
496 | private javax.swing.JPanel jPanel3;
497 | private javax.swing.JPanel jPanel4;
498 | private javax.swing.JRadioButton jRadioButton1;
499 | private javax.swing.JRadioButton jRadioButton2;
500 | private javax.swing.JTextField jTextField1;
501 | private javax.swing.JTextField jTextField2;
502 | private javax.swing.JTextField jTextField3;
503 | private javax.swing.JTextField jTextField4;
504 | private javax.swing.JTextField jTextField8;
505 | // End of variables declaration//GEN-END:variables
506 | }
507 |
--------------------------------------------------------------------------------
/src/Record.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
284 |
--------------------------------------------------------------------------------
/src/Record.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 | import javax.swing.JOptionPane;
7 | import java.sql.*;
8 | import java.sql.Connection;
9 | import java.sql.DriverManager;
10 | import javax.swing.table.*;
11 | /**
12 | *
13 | * @author Skyrunner
14 | */
15 | public class Record extends javax.swing.JFrame {
16 |
17 | /**
18 | * Creates new form Record
19 | */
20 | public Record() {
21 | initComponents();
22 | }
23 |
24 | /**
25 | * This method is called from within the constructor to initialize the form.
26 | * WARNING: Do NOT modify this code. The content of this method is always
27 | * regenerated by the Form Editor.
28 | */
29 | @SuppressWarnings("unchecked")
30 | // //GEN-BEGIN:initComponents
31 | private void initComponents() {
32 |
33 | jPanel2 = new javax.swing.JPanel();
34 | jScrollPane1 = new javax.swing.JScrollPane();
35 | jTable1 = new javax.swing.JTable();
36 | jPanel1 = new javax.swing.JPanel();
37 | jButton3 = new javax.swing.JButton();
38 | jLabel1 = new javax.swing.JLabel();
39 | jLabel3 = new javax.swing.JLabel();
40 | jTextField2 = new javax.swing.JTextField();
41 | jButton1 = new javax.swing.JButton();
42 | jButton2 = new javax.swing.JButton();
43 | jLabel2 = new javax.swing.JLabel();
44 | jTextField1 = new javax.swing.JTextField();
45 | jButton4 = new javax.swing.JButton();
46 |
47 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
48 | setTitle("Parking Management System");
49 |
50 | jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Record"));
51 |
52 | jTable1.setModel(new javax.swing.table.DefaultTableModel(
53 | new Object [][] {
54 |
55 | },
56 | new String [] {
57 | "Date", "Customer ID", "License Plate Number", "Spot ID", "Arrival Time", "Departure Time", "Total Fee Amount"
58 | }
59 | ));
60 | jScrollPane1.setViewportView(jTable1);
61 |
62 | jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Search Records"));
63 | jPanel1.setToolTipText("Search");
64 | jPanel1.setOpaque(false);
65 |
66 | jButton3.setText("Back");
67 | jButton3.addActionListener(new java.awt.event.ActionListener() {
68 | public void actionPerformed(java.awt.event.ActionEvent evt) {
69 | jButton3ActionPerformed(evt);
70 | }
71 | });
72 |
73 | jLabel1.setText("Enter Customer ID");
74 |
75 | jLabel3.setText("Enter Date");
76 |
77 | jTextField2.setToolTipText("YY-MM-DD");
78 |
79 | jButton1.setText("Search");
80 | jButton1.addActionListener(new java.awt.event.ActionListener() {
81 | public void actionPerformed(java.awt.event.ActionEvent evt) {
82 | jButton1ActionPerformed(evt);
83 | }
84 | });
85 |
86 | jButton2.setText("Reset");
87 | jButton2.addActionListener(new java.awt.event.ActionListener() {
88 | public void actionPerformed(java.awt.event.ActionEvent evt) {
89 | jButton2ActionPerformed(evt);
90 | }
91 | });
92 |
93 | jLabel2.setText("And");
94 |
95 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
96 | jPanel1.setLayout(jPanel1Layout);
97 | jPanel1Layout.setHorizontalGroup(
98 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
99 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
100 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
101 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
102 | .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
103 | .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
104 | .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))
105 | .addGap(66, 66, 66))
106 | .addGroup(jPanel1Layout.createSequentialGroup()
107 | .addContainerGap()
108 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
109 | .addGroup(jPanel1Layout.createSequentialGroup()
110 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
111 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
112 | .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))
113 | .addGap(34, 34, 34)
114 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
115 | .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 168, Short.MAX_VALUE)
116 | .addComponent(jTextField1)))
117 | .addGroup(jPanel1Layout.createSequentialGroup()
118 | .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
119 | .addGap(0, 0, Short.MAX_VALUE)))
120 | .addContainerGap())
121 | );
122 | jPanel1Layout.setVerticalGroup(
123 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
124 | .addGroup(jPanel1Layout.createSequentialGroup()
125 | .addContainerGap()
126 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
127 | .addComponent(jLabel1)
128 | .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
129 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
130 | .addComponent(jLabel2)
131 | .addGap(18, 18, 18)
132 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
133 | .addComponent(jLabel3)
134 | .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
135 | .addGap(48, 48, 48)
136 | .addComponent(jButton1)
137 | .addGap(38, 38, 38)
138 | .addComponent(jButton2)
139 | .addGap(38, 38, 38)
140 | .addComponent(jButton3)
141 | .addContainerGap(35, Short.MAX_VALUE))
142 | );
143 |
144 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
145 | jPanel2.setLayout(jPanel2Layout);
146 | jPanel2Layout.setHorizontalGroup(
147 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
148 | .addGroup(jPanel2Layout.createSequentialGroup()
149 | .addContainerGap()
150 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 884, javax.swing.GroupLayout.PREFERRED_SIZE)
151 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
152 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
153 | .addContainerGap())
154 | );
155 | jPanel2Layout.setVerticalGroup(
156 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
157 | .addGroup(jPanel2Layout.createSequentialGroup()
158 | .addContainerGap()
159 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
160 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
161 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
162 | .addContainerGap())
163 | );
164 |
165 | jButton4.setText("Parking");
166 | jButton4.addActionListener(new java.awt.event.ActionListener() {
167 | public void actionPerformed(java.awt.event.ActionEvent evt) {
168 | jButton4ActionPerformed(evt);
169 | }
170 | });
171 |
172 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
173 | getContentPane().setLayout(layout);
174 | layout.setHorizontalGroup(
175 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
176 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
177 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
178 | .addGap(18, 18, 18)
179 | .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
180 | .addContainerGap(34, Short.MAX_VALUE))
181 | );
182 | layout.setVerticalGroup(
183 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
184 | .addGroup(layout.createSequentialGroup()
185 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
186 | .addGap(0, 0, Short.MAX_VALUE))
187 | .addGroup(layout.createSequentialGroup()
188 | .addGap(165, 165, 165)
189 | .addComponent(jButton4)
190 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
191 | );
192 |
193 | pack();
194 | }// //GEN-END:initComponents
195 |
196 | private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
197 | // TODO add your handling code here:
198 | Welcome w = new Welcome();
199 | w.setVisible(true);
200 | this.dispose();
201 | }//GEN-LAST:event_jButton3ActionPerformed
202 |
203 | private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
204 | // TODO add your handling code here:
205 | Parking p = new Parking();
206 | p.setVisible(true);
207 | this.dispose();
208 | }//GEN-LAST:event_jButton4ActionPerformed
209 |
210 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
211 | // TODO add your handling code here:
212 | jTextField1.setText("");
213 | jTextField2.setText("");
214 | DefaultTableModel tm=(DefaultTableModel)jTable1.getModel();
215 | tm.setRowCount(0);
216 | }//GEN-LAST:event_jButton2ActionPerformed
217 |
218 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
219 | // TODO add your handling code he
220 | try{Class.forName("java.sql.Driver");
221 | String cust_ID =(jTextField1.getText());
222 | String date = (jTextField2.getText());
223 | Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/ParkingSystem","root","root");
224 | Statement st = con.createStatement();
225 | ResultSet myRs = st.executeQuery("select customer.C_date,customer.Cust_ID,Lise_No,Sp_assig,Arr_Time,Dept_Time,Tot_Amt from customer inner join payment on customer.C_date=payment.P_date where Cust_ID= '"+cust_ID+"' and C_date = '"+date+"';");
226 | while (myRs.next())
227 | {
228 | Object o[]={myRs.getDate("C_date"),myRs.getInt("Cust_ID"),myRs.getString("Lise_No"),myRs.getInt("Sp_assig"),myRs.getTime("Arr_Time"),myRs.getTime("Dept_Time"),myRs.getInt("Tot_Amt")};
229 | DefaultTableModel tm=(DefaultTableModel) jTable1.getModel();
230 | tm.addRow(o);
231 | }
232 | }
233 | catch (Exception ex)
234 | {System.out.println(ex);}
235 |
236 | }//GEN-LAST:event_jButton1ActionPerformed
237 |
238 | /**
239 | * @param args the command line arguments
240 | */
241 | public static void main(String args[]) {
242 | /* Set the Nimbus look and feel */
243 | //
244 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
245 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
246 | */
247 | try {
248 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
249 | if ("Nimbus".equals(info.getName())) {
250 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
251 | break;
252 | }
253 | }
254 | } catch (ClassNotFoundException ex) {
255 | java.util.logging.Logger.getLogger(Record.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
256 | } catch (InstantiationException ex) {
257 | java.util.logging.Logger.getLogger(Record.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
258 | } catch (IllegalAccessException ex) {
259 | java.util.logging.Logger.getLogger(Record.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
260 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
261 | java.util.logging.Logger.getLogger(Record.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
262 | }
263 | //
264 |
265 | /* Create and display the form */
266 | java.awt.EventQueue.invokeLater(new Runnable() {
267 | public void run() {
268 | new Record().setVisible(true);
269 | }
270 | });
271 | }
272 |
273 | // Variables declaration - do not modify//GEN-BEGIN:variables
274 | private javax.swing.JButton jButton1;
275 | private javax.swing.JButton jButton2;
276 | private javax.swing.JButton jButton3;
277 | private javax.swing.JButton jButton4;
278 | private javax.swing.JLabel jLabel1;
279 | private javax.swing.JLabel jLabel2;
280 | private javax.swing.JLabel jLabel3;
281 | private javax.swing.JPanel jPanel1;
282 | private javax.swing.JPanel jPanel2;
283 | private javax.swing.JScrollPane jScrollPane1;
284 | private javax.swing.JTable jTable1;
285 | private javax.swing.JTextField jTextField1;
286 | private javax.swing.JTextField jTextField2;
287 | // End of variables declaration//GEN-END:variables
288 | }
289 |
--------------------------------------------------------------------------------
/src/Welcome.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
126 |
--------------------------------------------------------------------------------
/src/Welcome.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 | import javax.swing.JOptionPane;
7 | /**
8 | *
9 | * @author Skyrunner
10 | */
11 | public class Welcome extends javax.swing.JFrame {
12 |
13 | /**
14 | * Creates new form Welcome
15 | */
16 | public Welcome() {
17 | initComponents();
18 | }
19 |
20 | /**
21 | * This method is called from within the constructor to initialize the form.
22 | * WARNING: Do NOT modify this code. The content of this method is always
23 | * regenerated by the Form Editor.
24 | */
25 | @SuppressWarnings("unchecked")
26 | // //GEN-BEGIN:initComponents
27 | private void initComponents() {
28 |
29 | jPanel1 = new javax.swing.JPanel();
30 | jButton2 = new javax.swing.JButton();
31 | jButton3 = new javax.swing.JButton();
32 | jButton1 = new javax.swing.JButton();
33 | jButton4 = new javax.swing.JButton();
34 |
35 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
36 | setTitle("Parking Management System");
37 |
38 | jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Welcome"));
39 |
40 | jButton2.setText("Parking");
41 | jButton2.addActionListener(new java.awt.event.ActionListener() {
42 | public void actionPerformed(java.awt.event.ActionEvent evt) {
43 | jButton2ActionPerformed(evt);
44 | }
45 | });
46 |
47 | jButton3.setText("Back");
48 | jButton3.addActionListener(new java.awt.event.ActionListener() {
49 | public void actionPerformed(java.awt.event.ActionEvent evt) {
50 | jButton3ActionPerformed(evt);
51 | }
52 | });
53 |
54 | jButton1.setText("Record");
55 | jButton1.addActionListener(new java.awt.event.ActionListener() {
56 | public void actionPerformed(java.awt.event.ActionEvent evt) {
57 | jButton1ActionPerformed(evt);
58 | }
59 | });
60 |
61 | jButton4.setText("Admin Settings");
62 | jButton4.addActionListener(new java.awt.event.ActionListener() {
63 | public void actionPerformed(java.awt.event.ActionEvent evt) {
64 | jButton4ActionPerformed(evt);
65 | }
66 | });
67 |
68 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
69 | jPanel1.setLayout(jPanel1Layout);
70 | jPanel1Layout.setHorizontalGroup(
71 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
72 | .addGroup(jPanel1Layout.createSequentialGroup()
73 | .addContainerGap()
74 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
75 | .addGroup(jPanel1Layout.createSequentialGroup()
76 | .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
77 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 240, Short.MAX_VALUE)
78 | .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))
79 | .addGroup(jPanel1Layout.createSequentialGroup()
80 | .addGap(122, 122, 122)
81 | .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
82 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 118, javax.swing.GroupLayout.PREFERRED_SIZE)))
83 | .addContainerGap())
84 | .addGroup(jPanel1Layout.createSequentialGroup()
85 | .addGap(117, 117, 117)
86 | .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
87 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
88 | );
89 | jPanel1Layout.setVerticalGroup(
90 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
91 | .addGroup(jPanel1Layout.createSequentialGroup()
92 | .addContainerGap()
93 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
94 | .addComponent(jButton1)
95 | .addComponent(jButton2))
96 | .addGap(83, 83, 83)
97 | .addComponent(jButton4)
98 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 113, Short.MAX_VALUE)
99 | .addComponent(jButton3)
100 | .addContainerGap())
101 | );
102 |
103 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
104 | getContentPane().setLayout(layout);
105 | layout.setHorizontalGroup(
106 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
107 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
108 | );
109 | layout.setVerticalGroup(
110 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
111 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
112 | );
113 |
114 | pack();
115 | }// //GEN-END:initComponents
116 |
117 | private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
118 | // TODO add your handling code here:
119 | Login b= new Login();
120 | this.dispose();
121 | b.setVisible(true);
122 | }//GEN-LAST:event_jButton3ActionPerformed
123 |
124 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
125 | // TODO add your handling code here:
126 | Record r = new Record();
127 | r.setVisible(true);
128 | this.dispose();
129 | }//GEN-LAST:event_jButton1ActionPerformed
130 |
131 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
132 | // TODO add your handling code here:
133 | Parking p = new Parking();
134 | p.setVisible(true);
135 | this.dispose();
136 | }//GEN-LAST:event_jButton2ActionPerformed
137 |
138 | private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
139 | // TODO add your handling code here:
140 | Admin_Settings as = new Admin_Settings();
141 | as.setVisible(true);
142 | this.dispose();
143 | }//GEN-LAST:event_jButton4ActionPerformed
144 |
145 | /**
146 | * @param args the command line arguments
147 | */
148 | public static void main(String args[]) {
149 | /* Set the Nimbus look and feel */
150 | //
151 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
152 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
153 | */
154 | try {
155 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
156 | if ("Nimbus".equals(info.getName())) {
157 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
158 | break;
159 | }
160 | }
161 | } catch (ClassNotFoundException ex) {
162 | java.util.logging.Logger.getLogger(Welcome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
163 | } catch (InstantiationException ex) {
164 | java.util.logging.Logger.getLogger(Welcome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
165 | } catch (IllegalAccessException ex) {
166 | java.util.logging.Logger.getLogger(Welcome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
167 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
168 | java.util.logging.Logger.getLogger(Welcome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
169 | }
170 | //
171 |
172 | /* Create and display the form */
173 | java.awt.EventQueue.invokeLater(new Runnable() {
174 | public void run() {
175 | new Welcome().setVisible(true);
176 | }
177 | });
178 | }
179 |
180 | // Variables declaration - do not modify//GEN-BEGIN:variables
181 | private javax.swing.JButton jButton1;
182 | private javax.swing.JButton jButton2;
183 | private javax.swing.JButton jButton3;
184 | private javax.swing.JButton jButton4;
185 | private javax.swing.JPanel jPanel1;
186 | // End of variables declaration//GEN-END:variables
187 | }
188 |
--------------------------------------------------------------------------------