diff --git a/desktop/classes/.data/desktop.cdi b/desktop/classes/.data/desktop.cdi index 73449d4..643f06a 100644 Binary files a/desktop/classes/.data/desktop.cdi and b/desktop/classes/.data/desktop.cdi differ diff --git a/desktop/classes/desktop/Employee$1.class b/desktop/classes/desktop/Employee$1.class index 23d387d..b225c43 100644 Binary files a/desktop/classes/desktop/Employee$1.class and b/desktop/classes/desktop/Employee$1.class differ diff --git a/desktop/classes/desktop/Employee$2.class b/desktop/classes/desktop/Employee$2.class index 253c47e..d0596bb 100644 Binary files a/desktop/classes/desktop/Employee$2.class and b/desktop/classes/desktop/Employee$2.class differ diff --git a/desktop/classes/desktop/Employee$3.class b/desktop/classes/desktop/Employee$3.class index ac827b8..7c7408c 100644 Binary files a/desktop/classes/desktop/Employee$3.class and b/desktop/classes/desktop/Employee$3.class differ diff --git a/desktop/classes/desktop/Employee$4.class b/desktop/classes/desktop/Employee$4.class index 9b4e235..fcc5539 100644 Binary files a/desktop/classes/desktop/Employee$4.class and b/desktop/classes/desktop/Employee$4.class differ diff --git a/desktop/classes/desktop/Employee$5.class b/desktop/classes/desktop/Employee$5.class index e69d696..37c4cc3 100644 Binary files a/desktop/classes/desktop/Employee$5.class and b/desktop/classes/desktop/Employee$5.class differ diff --git a/desktop/classes/desktop/Employee$6.class b/desktop/classes/desktop/Employee$6.class index 3ae959f..8925166 100644 Binary files a/desktop/classes/desktop/Employee$6.class and b/desktop/classes/desktop/Employee$6.class differ diff --git a/desktop/classes/desktop/Employee$7.class b/desktop/classes/desktop/Employee$7.class new file mode 100644 index 0000000..585d4e8 Binary files /dev/null and b/desktop/classes/desktop/Employee$7.class differ diff --git a/desktop/classes/desktop/Employee.class b/desktop/classes/desktop/Employee.class index d7dd8e8..bb419a5 100644 Binary files a/desktop/classes/desktop/Employee.class and b/desktop/classes/desktop/Employee.class differ diff --git a/desktop/classes/desktop/Finance$1.class b/desktop/classes/desktop/Finance$1.class index 3ad0fbd..0608f85 100644 Binary files a/desktop/classes/desktop/Finance$1.class and b/desktop/classes/desktop/Finance$1.class differ diff --git a/desktop/classes/desktop/Finance$2.class b/desktop/classes/desktop/Finance$2.class index 4ad710d..bacecc9 100644 Binary files a/desktop/classes/desktop/Finance$2.class and b/desktop/classes/desktop/Finance$2.class differ diff --git a/desktop/classes/desktop/Finance$3.class b/desktop/classes/desktop/Finance$3.class index 79e97f8..95335e0 100644 Binary files a/desktop/classes/desktop/Finance$3.class and b/desktop/classes/desktop/Finance$3.class differ diff --git a/desktop/classes/desktop/Finance$4.class b/desktop/classes/desktop/Finance$4.class index 0e3118f..8e26612 100644 Binary files a/desktop/classes/desktop/Finance$4.class and b/desktop/classes/desktop/Finance$4.class differ diff --git a/desktop/classes/desktop/Finance.class b/desktop/classes/desktop/Finance.class index 1784843..9664650 100644 Binary files a/desktop/classes/desktop/Finance.class and b/desktop/classes/desktop/Finance.class differ diff --git a/desktop/classes/desktop/Inventory$1.class b/desktop/classes/desktop/Inventory$1.class index 90e63ff..6d8a4f2 100644 Binary files a/desktop/classes/desktop/Inventory$1.class and b/desktop/classes/desktop/Inventory$1.class differ diff --git a/desktop/classes/desktop/Inventory$2.class b/desktop/classes/desktop/Inventory$2.class index 0b6fdf6..cd6ad30 100644 Binary files a/desktop/classes/desktop/Inventory$2.class and b/desktop/classes/desktop/Inventory$2.class differ diff --git a/desktop/classes/desktop/Inventory$3.class b/desktop/classes/desktop/Inventory$3.class index 23c7e4a..31bbd0c 100644 Binary files a/desktop/classes/desktop/Inventory$3.class and b/desktop/classes/desktop/Inventory$3.class differ diff --git a/desktop/classes/desktop/Inventory$4.class b/desktop/classes/desktop/Inventory$4.class index c1a4dfb..60fbc5b 100644 Binary files a/desktop/classes/desktop/Inventory$4.class and b/desktop/classes/desktop/Inventory$4.class differ diff --git a/desktop/classes/desktop/Inventory$5.class b/desktop/classes/desktop/Inventory$5.class index 69345a2..1c29def 100644 Binary files a/desktop/classes/desktop/Inventory$5.class and b/desktop/classes/desktop/Inventory$5.class differ diff --git a/desktop/classes/desktop/Inventory$6.class b/desktop/classes/desktop/Inventory$6.class index fcd7d40..6029d8b 100644 Binary files a/desktop/classes/desktop/Inventory$6.class and b/desktop/classes/desktop/Inventory$6.class differ diff --git a/desktop/classes/desktop/Inventory$7.class b/desktop/classes/desktop/Inventory$7.class new file mode 100644 index 0000000..d2b5afe Binary files /dev/null and b/desktop/classes/desktop/Inventory$7.class differ diff --git a/desktop/classes/desktop/Inventory.class b/desktop/classes/desktop/Inventory.class index 93246cf..5589405 100644 Binary files a/desktop/classes/desktop/Inventory.class and b/desktop/classes/desktop/Inventory.class differ diff --git a/desktop/classes/desktop/ManagerProfile$1.class b/desktop/classes/desktop/ManagerProfile$1.class index 70ddb42..5cc28f0 100644 Binary files a/desktop/classes/desktop/ManagerProfile$1.class and b/desktop/classes/desktop/ManagerProfile$1.class differ diff --git a/desktop/classes/desktop/ManagerProfile$2.class b/desktop/classes/desktop/ManagerProfile$2.class index 68717a2..84ef7c0 100644 Binary files a/desktop/classes/desktop/ManagerProfile$2.class and b/desktop/classes/desktop/ManagerProfile$2.class differ diff --git a/desktop/classes/desktop/ManagerProfile$3.class b/desktop/classes/desktop/ManagerProfile$3.class index ee8ff15..21edee1 100644 Binary files a/desktop/classes/desktop/ManagerProfile$3.class and b/desktop/classes/desktop/ManagerProfile$3.class differ diff --git a/desktop/classes/desktop/ManagerProfile$4.class b/desktop/classes/desktop/ManagerProfile$4.class index 4130df1..eacad0c 100644 Binary files a/desktop/classes/desktop/ManagerProfile$4.class and b/desktop/classes/desktop/ManagerProfile$4.class differ diff --git a/desktop/classes/desktop/ManagerProfile$5.class b/desktop/classes/desktop/ManagerProfile$5.class index e2c5026..4477ad5 100644 Binary files a/desktop/classes/desktop/ManagerProfile$5.class and b/desktop/classes/desktop/ManagerProfile$5.class differ diff --git a/desktop/classes/desktop/ManagerProfile$6.class b/desktop/classes/desktop/ManagerProfile$6.class index 85758bd..fce14e7 100644 Binary files a/desktop/classes/desktop/ManagerProfile$6.class and b/desktop/classes/desktop/ManagerProfile$6.class differ diff --git a/desktop/classes/desktop/ManagerProfile$7.class b/desktop/classes/desktop/ManagerProfile$7.class index fbef86c..765b75a 100644 Binary files a/desktop/classes/desktop/ManagerProfile$7.class and b/desktop/classes/desktop/ManagerProfile$7.class differ diff --git a/desktop/classes/desktop/ManagerProfile$8.class b/desktop/classes/desktop/ManagerProfile$8.class index 8ea1b33..ecf4099 100644 Binary files a/desktop/classes/desktop/ManagerProfile$8.class and b/desktop/classes/desktop/ManagerProfile$8.class differ diff --git a/desktop/classes/desktop/ManagerProfile$9.class b/desktop/classes/desktop/ManagerProfile$9.class index 1306855..4eb4961 100644 Binary files a/desktop/classes/desktop/ManagerProfile$9.class and b/desktop/classes/desktop/ManagerProfile$9.class differ diff --git a/desktop/classes/desktop/ManagerProfile.class b/desktop/classes/desktop/ManagerProfile.class index d6cb6e2..c2f81ad 100644 Binary files a/desktop/classes/desktop/ManagerProfile.class and b/desktop/classes/desktop/ManagerProfile.class differ diff --git a/desktop/classes/desktop/Schedule$1.class b/desktop/classes/desktop/Schedule$1.class index d122005..607744f 100644 Binary files a/desktop/classes/desktop/Schedule$1.class and b/desktop/classes/desktop/Schedule$1.class differ diff --git a/desktop/classes/desktop/Schedule$2.class b/desktop/classes/desktop/Schedule$2.class index c506e86..2f512da 100644 Binary files a/desktop/classes/desktop/Schedule$2.class and b/desktop/classes/desktop/Schedule$2.class differ diff --git a/desktop/classes/desktop/Schedule$3.class b/desktop/classes/desktop/Schedule$3.class index d9a5c6f..aaa791f 100644 Binary files a/desktop/classes/desktop/Schedule$3.class and b/desktop/classes/desktop/Schedule$3.class differ diff --git a/desktop/classes/desktop/Schedule$4.class b/desktop/classes/desktop/Schedule$4.class index db1729f..fe25930 100644 Binary files a/desktop/classes/desktop/Schedule$4.class and b/desktop/classes/desktop/Schedule$4.class differ diff --git a/desktop/classes/desktop/Schedule$5.class b/desktop/classes/desktop/Schedule$5.class index 36285df..2573ec3 100644 Binary files a/desktop/classes/desktop/Schedule$5.class and b/desktop/classes/desktop/Schedule$5.class differ diff --git a/desktop/classes/desktop/Schedule$6.class b/desktop/classes/desktop/Schedule$6.class index 0c9f3e3..3a49c8e 100644 Binary files a/desktop/classes/desktop/Schedule$6.class and b/desktop/classes/desktop/Schedule$6.class differ diff --git a/desktop/classes/desktop/Schedule$7.class b/desktop/classes/desktop/Schedule$7.class index dea0fd6..6ba38b6 100644 Binary files a/desktop/classes/desktop/Schedule$7.class and b/desktop/classes/desktop/Schedule$7.class differ diff --git a/desktop/classes/desktop/Schedule$8.class b/desktop/classes/desktop/Schedule$8.class index a6b99e6..ddaf3eb 100644 Binary files a/desktop/classes/desktop/Schedule$8.class and b/desktop/classes/desktop/Schedule$8.class differ diff --git a/desktop/classes/desktop/Schedule.class b/desktop/classes/desktop/Schedule.class index 907194b..d76b084 100644 Binary files a/desktop/classes/desktop/Schedule.class and b/desktop/classes/desktop/Schedule.class differ diff --git a/desktop/classes/desktop/Table.class b/desktop/classes/desktop/Table.class index 0f89a1d..fbaba44 100644 Binary files a/desktop/classes/desktop/Table.class and b/desktop/classes/desktop/Table.class differ diff --git a/desktop/classes/desktop/ViewTable.class b/desktop/classes/desktop/ViewTable.class index c6fda55..ced82ed 100644 Binary files a/desktop/classes/desktop/ViewTable.class and b/desktop/classes/desktop/ViewTable.class differ diff --git a/desktop/src/desktop/Employee.form b/desktop/src/desktop/Employee.form index 6aa09bf..3e25579 100644 --- a/desktop/src/desktop/Employee.form +++ b/desktop/src/desktop/Employee.form @@ -3,6 +3,7 @@
+ @@ -35,73 +36,82 @@ - + - - - + + + - - + + - - - - - - - + - - + + + + + + + + + + + + + + + + + + + + + + - - - + + - - + - - - - + + - + - - - - - - - - - - - - + - - - - - + + + + + + + + + + + + + + + @@ -114,7 +124,7 @@ - + @@ -122,27 +132,15 @@ - - - - - + - - - - - + - - - - @@ -151,62 +149,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -226,7 +168,7 @@ - + @@ -300,21 +242,30 @@ - + - + + + + - + + + + - + - + + + + @@ -325,10 +276,13 @@ - + - + + + + @@ -339,10 +293,13 @@ - + - + + + + @@ -352,5 +309,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/desktop/src/desktop/Employee.java b/desktop/src/desktop/Employee.java index c344b5d..1cbf394 100644 --- a/desktop/src/desktop/Employee.java +++ b/desktop/src/desktop/Employee.java @@ -55,6 +55,7 @@ public class Employee extends javax.swing.JFrame { Toolkit tk = Toolkit.getDefaultToolkit(); int xSize = ((int)tk.getScreenSize().getWidth()); int ySize = ((int)tk.getScreenSize().getHeight())-30; + String args[] = {}; public Employee() throws SQLException, IOException { restLogo = ImageIO.read(new File(logopath)); restIcon = new ImageIcon(restLogo); @@ -72,11 +73,7 @@ public Employee() throws SQLException, IOException { private void initComponents() {//GEN-BEGIN:initComponents PicturePanel = new javax.swing.JPanel(); - LabelContainingPicture = new javax.swing.JLabel(); PictureLabel = new javax.swing.JLabel(); - InfoPanel = new javax.swing.JPanel(); - jScrollPane1 = new javax.swing.JScrollPane(); - InfoTextArea = new javax.swing.JTextArea(); InformationLabel = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); ModifyTable = new javax.swing.JTable(); @@ -86,66 +83,36 @@ private void initComponents() {//GEN-BEGIN:initComponents DeleteEmployee = new javax.swing.JButton(); AddtoDB = new javax.swing.JButton(); RestaurantLogoLabel = new javax.swing.JLabel(); + LabelContainingPicture = new javax.swing.JLabel(); + jScrollPane1 = new javax.swing.JScrollPane(); + InfoTextArea = new javax.swing.JTextArea(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Tabit"); setBackground(new java.awt.Color(0, 153, 153)); setIconImage(img.getImage()); setPreferredSize(new Dimension(xSize, ySize)); PicturePanel.setBackground(new java.awt.Color(255, 255, 255)); - PicturePanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 6)); + PicturePanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3)); javax.swing.GroupLayout PicturePanelLayout = new javax.swing.GroupLayout(PicturePanel); PicturePanel.setLayout(PicturePanelLayout); PicturePanelLayout.setHorizontalGroup( PicturePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(PicturePanelLayout.createSequentialGroup() - .addGap(21, 21, 21) - .addComponent(LabelContainingPicture, javax.swing.GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE) - .addGap(21, 21, 21)) + .addGap(0, 0, Short.MAX_VALUE) ); PicturePanelLayout.setVerticalGroup( PicturePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(PicturePanelLayout.createSequentialGroup() - .addContainerGap() - .addComponent(LabelContainingPicture, javax.swing.GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE) - .addContainerGap()) + .addGap(0, 0, Short.MAX_VALUE) ); PictureLabel.setFont(new java.awt.Font("Arial", 1, 24)); // NOI18N - InfoPanel.setBackground(new java.awt.Color(0, 0, 0)); - InfoPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3)); - - InfoTextArea.setEditable(false); - InfoTextArea.setColumns(20); - InfoTextArea.setRows(5); - InfoTextArea.setFont(bfont); - InfoTextArea.setForeground(Color.blue); - InfoTextArea.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); - jScrollPane1.setViewportView(InfoTextArea); - - javax.swing.GroupLayout InfoPanelLayout = new javax.swing.GroupLayout(InfoPanel); - InfoPanel.setLayout(InfoPanelLayout); - InfoPanelLayout.setHorizontalGroup( - InfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(InfoPanelLayout.createSequentialGroup() - .addGap(23, 23, 23) - .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 287, Short.MAX_VALUE) - .addGap(21, 21, 21)) - ); - InfoPanelLayout.setVerticalGroup( - InfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, InfoPanelLayout.createSequentialGroup() - .addGap(25, 25, 25) - .addComponent(jScrollPane1) - .addGap(23, 23, 23)) - ); - InformationLabel.setFont(new java.awt.Font("Arial", 1, 24)); // NOI18N InformationLabel.setText("Employee Information"); - ModifyTable.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3)); + ModifyTable.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2)); ModifyTable.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null, null, null, null}, @@ -202,12 +169,19 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { ModifyLabel.setFont(new java.awt.Font("Arial", 1, 24)); // NOI18N ModifyLabel.setText("Modify Employee Information"); - Exit.setBackground(new java.awt.Color(204, 255, 255)); - Exit.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N - Exit.setText("Exit"); + Exit.setBackground(new java.awt.Color(0, 0, 153)); + Exit.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + Exit.setForeground(new java.awt.Color(255, 255, 255)); + Exit.setText("Back"); + Exit.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + ExitActionPerformed(evt); + } + }); - AddEmployee.setBackground(new java.awt.Color(204, 255, 255)); - AddEmployee.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N + AddEmployee.setBackground(new java.awt.Color(0, 0, 153)); + AddEmployee.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + AddEmployee.setForeground(new java.awt.Color(255, 255, 255)); AddEmployee.setText("New Employee"); AddEmployee.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -215,8 +189,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); - DeleteEmployee.setBackground(new java.awt.Color(204, 255, 255)); - DeleteEmployee.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N + DeleteEmployee.setBackground(new java.awt.Color(0, 0, 153)); + DeleteEmployee.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + DeleteEmployee.setForeground(new java.awt.Color(255, 255, 255)); DeleteEmployee.setText("Delete Employee"); DeleteEmployee.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -224,8 +199,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); - AddtoDB.setBackground(new java.awt.Color(204, 255, 255)); - AddtoDB.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N + AddtoDB.setBackground(new java.awt.Color(0, 0, 153)); + AddtoDB.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + AddtoDB.setForeground(new java.awt.Color(255, 255, 255)); AddtoDB.setText("Save"); AddtoDB.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -233,6 +209,15 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); + InfoTextArea.setEditable(false); + InfoTextArea.setColumns(20); + InfoTextArea.setLineWrap(true); + InfoTextArea.setRows(5); + InfoTextArea.setFont(bfont); + InfoTextArea.setForeground(Color.blue); + InfoTextArea.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3)); + jScrollPane1.setViewportView(InfoTextArea); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( @@ -240,57 +225,64 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(layout.createSequentialGroup() .addGap(20, 20, 20) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 606, Short.MAX_VALUE) + .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 489, Short.MAX_VALUE) .addComponent(ModifyLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addComponent(AddEmployee, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(DeleteEmployee, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(AddEmployee, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(DeleteEmployee, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(Exit, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(AddtoDB, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)))) + .addComponent(Exit, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE) + .addComponent(AddtoDB, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(PicturePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(PictureLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(RestaurantLogoLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(InformationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(InfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap()) + .addGroup(layout.createSequentialGroup() + .addComponent(LabelContainingPicture, javax.swing.GroupLayout.DEFAULT_SIZE, 6, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(PicturePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addComponent(PictureLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 32, Short.MAX_VALUE))) + .addGap(23, 23, 23) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 318, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(InformationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(85, 85, 85)) + .addGroup(layout.createSequentialGroup() + .addGap(55, 55, 55) + .addComponent(RestaurantLogoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(InformationLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(PictureLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(ModifyLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)) + .addComponent(ModifyLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(7, 7, 7) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(LabelContainingPicture, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() - .addComponent(InfoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGap(25, 25, 25)) - .addGroup(layout.createSequentialGroup() - .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(InformationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(AddEmployee) - .addComponent(AddtoDB, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addGroup(layout.createSequentialGroup() - .addComponent(DeleteEmployee) - .addContainerGap()) - .addComponent(Exit, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addComponent(jScrollPane1)) + .addComponent(PicturePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) + .addComponent(RestaurantLogoLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addComponent(AddEmployee, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(5, 5, 5) + .addComponent(DeleteEmployee, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() - .addComponent(PicturePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(33, 33, 33) - .addComponent(RestaurantLogoLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE) - .addContainerGap()))) + .addComponent(AddtoDB, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(5, 5, 5) + .addComponent(Exit, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap()) ); pack(); @@ -460,6 +452,12 @@ private void AddtoDBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST }//GEN-LAST:event_AddtoDBActionPerformed + + private void ExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ExitActionPerformed + // TODO add your handling code here: + ManagerProfile.main(args); + super.dispose(); + }//GEN-LAST:event_ExitActionPerformed public static boolean isDateValid(String date) { @@ -557,7 +555,6 @@ public void run() { private javax.swing.JButton AddtoDB; private javax.swing.JButton DeleteEmployee; private javax.swing.JButton Exit; - private javax.swing.JPanel InfoPanel; private javax.swing.JTextArea InfoTextArea; private javax.swing.JLabel InformationLabel; private javax.swing.JLabel LabelContainingPicture; diff --git a/desktop/src/desktop/Finance.form b/desktop/src/desktop/Finance.form index 6b44eac..70491e3 100644 --- a/desktop/src/desktop/Finance.form +++ b/desktop/src/desktop/Finance.form @@ -3,6 +3,7 @@
+ @@ -26,22 +27,19 @@ + + + + + + - - - - - - - - - - - - + + + @@ -55,14 +53,22 @@ - - + + + + + + + + + + @@ -80,6 +86,11 @@ + + + + + @@ -94,12 +105,12 @@ - + <Title value="Field"/> <Editor/> <Renderer/> </Column> <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> - <Title/> + <Title value="Amount"/> <Editor/> <Renderer/> </Column> @@ -130,7 +141,7 @@ </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="jDesktopPane1" alignment="0" pref="232" max="32767" attributes="0"/> + <Component id="jDesktopPane1" alignment="0" pref="228" max="32767" attributes="0"/> </Group> </DimensionLayout> </Layout> @@ -144,31 +155,61 @@ <SubComponents> <Component class="javax.swing.JButton" name="jButton4"> <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="0" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> <Property name="text" type="java.lang.String" value="Daily Sales"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription"> - <JLayeredPaneConstraints x="10" y="20" width="130" height="-1" layer="0" position="-1"/> + <JLayeredPaneConstraints x="20" y="20" width="140" height="40" layer="0" position="-1"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JButton" name="jButton5"> <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="0" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> <Property name="text" type="java.lang.String" value="Weekly Sales"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription"> - <JLayeredPaneConstraints x="10" y="50" width="130" height="-1" layer="0" position="-1"/> + <JLayeredPaneConstraints x="20" y="90" width="140" height="40" layer="0" position="-1"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JButton" name="jButton6"> <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="0" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> <Property name="text" type="java.lang.String" value="Monthly Sales"/> </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton6ActionPerformed"/> + </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription"> - <JLayeredPaneConstraints x="10" y="80" width="130" height="-1" layer="0" position="-1"/> + <JLayeredPaneConstraints x="20" y="160" width="140" height="40" layer="0" position="-1"/> </Constraint> </Constraints> </Component> @@ -180,8 +221,20 @@ </Container> <Component class="javax.swing.JButton" name="jButton1"> <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="0" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> <Property name="text" type="java.lang.String" value="Back"/> </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> </Component> <Component class="javax.swing.JLabel" name="jLabel1"> <Properties> diff --git a/desktop/src/desktop/Finance.java b/desktop/src/desktop/Finance.java index 3119edf..4019cbb 100644 --- a/desktop/src/desktop/Finance.java +++ b/desktop/src/desktop/Finance.java @@ -9,9 +9,12 @@ */ public class Finance extends javax.swing.JFrame { ImageIcon img = new ImageIcon("C:\\Users\\Nicolas Nunez\\Desktop\\tabit\\desktop\\src\\desktop\\logo.png"); + String args[] = {}; /** Creates new form Finance */ public Finance() { + initComponents(); + this.setLocationRelativeTo(getRootPane()); } /** This method is called from within the constructor to @@ -34,8 +37,13 @@ private void initComponents() {//GEN-BEGIN:initComponents jLabel1 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Tabit"); setIconImage(img.getImage()); + jSplitPane1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3)); + jSplitPane1.setDividerSize(0); + + jTable1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {"Gross Sales", null}, @@ -56,19 +64,35 @@ public boolean isCellEditable(int rowIndex, int columnIndex) { } }); jScrollPane1.setViewportView(jTable1); + jTable1.getColumnModel().getColumn(0).setHeaderValue("Field"); + jTable1.getColumnModel().getColumn(1).setHeaderValue("Amount"); jSplitPane1.setRightComponent(jScrollPane1); + jButton4.setBackground(new java.awt.Color(0, 0, 153)); + jButton4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jButton4.setForeground(new java.awt.Color(255, 255, 255)); jButton4.setText("Daily Sales"); - jButton4.setBounds(10, 20, 130, 21); + jButton4.setBounds(20, 20, 140, 40); jDesktopPane1.add(jButton4, javax.swing.JLayeredPane.DEFAULT_LAYER); + jButton5.setBackground(new java.awt.Color(0, 0, 153)); + jButton5.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jButton5.setForeground(new java.awt.Color(255, 255, 255)); jButton5.setText("Weekly Sales"); - jButton5.setBounds(10, 50, 130, 21); + jButton5.setBounds(20, 90, 140, 40); jDesktopPane1.add(jButton5, javax.swing.JLayeredPane.DEFAULT_LAYER); + jButton6.setBackground(new java.awt.Color(0, 0, 153)); + jButton6.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jButton6.setForeground(new java.awt.Color(255, 255, 255)); jButton6.setText("Monthly Sales"); - jButton6.setBounds(10, 80, 130, 21); + jButton6.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton6ActionPerformed(evt); + } + }); + jButton6.setBounds(20, 160, 140, 40); jDesktopPane1.add(jButton6, javax.swing.JLayeredPane.DEFAULT_LAYER); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); @@ -81,12 +105,20 @@ public boolean isCellEditable(int rowIndex, int columnIndex) { ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE) + .addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE) ); jSplitPane1.setLeftComponent(jPanel1); + jButton1.setBackground(new java.awt.Color(0, 0, 153)); + jButton1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); jButton1.setText("Back"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); jLabel1.setText("Tabit - Finances"); @@ -94,18 +126,17 @@ public boolean isCellEditable(int rowIndex, int columnIndex) { getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(27, 27, 27) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 296, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(713, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 996, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addGap(27, 27, 27) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 296, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addGap(0, 0, Short.MAX_VALUE) - .addComponent(jButton1))))) + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 996, Short.MAX_VALUE)) .addGap(28, 28, 28)) ); layout.setVerticalGroup( @@ -116,13 +147,23 @@ public boolean isCellEditable(int rowIndex, int columnIndex) { .addGap(53, 53, 53) .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE) .addGap(33, 33, 33) - .addComponent(jButton1) - .addGap(44, 44, 44)) + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(19, 19, 19)) ); pack(); }//GEN-END:initComponents + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + // TODO add your handling code here: + ManagerProfile.main(args); + super.dispose(); + }//GEN-LAST:event_jButton1ActionPerformed + + private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton6ActionPerformed + /** * @param args the command line arguments */ diff --git a/desktop/src/desktop/Inventory.form b/desktop/src/desktop/Inventory.form index 0b351c0..b6b6144 100644 --- a/desktop/src/desktop/Inventory.form +++ b/desktop/src/desktop/Inventory.form @@ -3,6 +3,7 @@ <Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> <Properties> <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Tabit"/> <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> <Color blue="ff" green="99" red="0" type="rgb"/> </Property> @@ -35,51 +36,56 @@ <Group type="102" attributes="0"> <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="jScrollPane1" pref="815" max="32767" attributes="0"/> + <Component id="jScrollPane1" pref="824" max="32767" attributes="0"/> <Group type="102" attributes="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="jButton1" min="-2" pref="97" max="-2" attributes="0"/> - <Component id="jButton4" alignment="0" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jButton4" linkSize="1" max="32767" attributes="0"/> + <Component id="jButton1" linkSize="1" max="32767" attributes="0"/> </Group> <EmptySpace max="32767" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="jButton2" alignment="1" min="-2" max="-2" attributes="0"/> - <Component id="jButton3" alignment="1" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jButton3" linkSize="1" max="32767" attributes="0"/> + <Component id="jButton2" linkSize="1" pref="92" max="32767" attributes="0"/> </Group> </Group> </Group> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace min="-2" pref="5" max="-2" attributes="0"/> - <Component id="jPanel1" max="32767" attributes="0"/> - </Group> - <Group type="102" attributes="0"> - <EmptySpace max="32767" attributes="0"/> - <Component id="RestaurantLogoLabel" min="-2" pref="350" max="-2" attributes="0"/> - </Group> + <EmptySpace min="-2" pref="5" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jPanel1" max="32767" attributes="0"/> + <Component id="RestaurantLogoLabel" min="-2" pref="360" max="-2" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="24" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" pref="136" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="78" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="27" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" pref="33" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> <Component id="jScrollPane1" pref="0" max="32767" attributes="0"/> <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="jButton4" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jButton3" alignment="3" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="2" attributes="0"> + <Group type="102" alignment="2" attributes="0"> + <Component id="jButton1" linkSize="2" max="32767" attributes="0"/> + <EmptySpace min="11" pref="11" max="11" attributes="0"/> + <Component id="jButton4" linkSize="2" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="2" attributes="0"> + <Component id="jButton2" linkSize="2" pref="43" max="32767" attributes="0"/> + <EmptySpace min="11" pref="11" max="11" attributes="0"/> + <Component id="jButton3" linkSize="2" pref="40" max="32767" attributes="0"/> + </Group> </Group> - <EmptySpace min="-2" pref="70" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="39" max="-2" attributes="0"/> </Group> <Group type="102" alignment="0" attributes="0"> <Component id="jPanel1" max="32767" attributes="0"/> @@ -102,6 +108,11 @@ <SubComponents> <Component class="javax.swing.JTable" name="jTable1"> <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder thickness="2"/> + </Border> + </Property> <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> <Connection code="new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, "YYYY/MM/DD", null, null, null, null, null, null} }, new String [] { "ID", "Product Name", "Quantity", "Date In", "Cost Unit", "Total Cost", "Sale Price", "Empl ID", "Vendor", "Vendor No" } ) { Class[] types = new Class [] { java.lang.Integer.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class, java.lang.Float.class, java.lang.Float.class, java.lang.Float.class, java.lang.Integer.class, java.lang.String.class, java.lang.Integer.class }; public Class getColumnClass(int columnIndex) { return types [columnIndex]; } }" type="code"/> </Property> @@ -120,6 +131,15 @@ </Container> <Component class="javax.swing.JButton" name="jButton1"> <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="0" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> <Property name="text" type="java.lang.String" value="Add Item"/> </Properties> <Events> @@ -128,6 +148,15 @@ </Component> <Component class="javax.swing.JButton" name="jButton2"> <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="0" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> <Property name="text" type="java.lang.String" value="Save"/> </Properties> <Events> @@ -136,8 +165,20 @@ </Component> <Component class="javax.swing.JButton" name="jButton3"> <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="0" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> <Property name="text" type="java.lang.String" value="Back"/> </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> </Component> <Container class="javax.swing.JPanel" name="jPanel1"> <Properties> @@ -149,20 +190,12 @@ <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> - <Component id="jScrollPane2" pref="322" max="32767" attributes="0"/> - <EmptySpace min="-2" pref="25" max="-2" attributes="0"/> - </Group> + <Component id="jScrollPane2" alignment="1" pref="366" max="32767" attributes="0"/> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="1" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="jScrollPane2" pref="130" max="32767" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - </Group> + <Component id="jScrollPane2" alignment="1" pref="154" max="32767" attributes="0"/> </Group> </DimensionLayout> </Layout> @@ -184,6 +217,11 @@ <Connection code="5" type="code"/> </Property> <Property name="wrapStyleWord" type="boolean" value="true"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder thickness="3"/> + </Border> + </Property> </Properties> <AuxValues> <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JTextArea()"/> @@ -196,6 +234,15 @@ </Container> <Component class="javax.swing.JButton" name="jButton4"> <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="0" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> <Property name="text" type="java.lang.String" value="Remove Row"/> </Properties> <Events> @@ -204,5 +251,10 @@ </Component> <Component class="javax.swing.JLabel" name="RestaurantLogoLabel"> </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="text" type="java.lang.String" value="Tabit - Inventory"/> + </Properties> + </Component> </SubComponents> </Form> diff --git a/desktop/src/desktop/Inventory.java b/desktop/src/desktop/Inventory.java index 1ffe3a8..f9ad012 100644 --- a/desktop/src/desktop/Inventory.java +++ b/desktop/src/desktop/Inventory.java @@ -45,13 +45,14 @@ public class Inventory extends javax.swing.JFrame { Toolkit tk = Toolkit.getDefaultToolkit(); int xSize = ((int)tk.getScreenSize().getWidth()); int ySize = ((int)tk.getScreenSize().getHeight())-30; - + String args[] = {}; public Inventory() throws SQLException, IOException { databit = new DataHandler(); picture = ImageIO.read(new File(LosAltosPath)); iicon = new ImageIcon(picture); initComponents(); this.RestaurantLogoLabel.setIcon(iicon); + this.setLocationRelativeTo(getRootPane()); } /** This method is called from within the constructor to @@ -72,12 +73,15 @@ private void initComponents() {//GEN-BEGIN:initComponents jTextArea1 = new javax.swing.JTextArea(); jButton4 = new javax.swing.JButton(); RestaurantLogoLabel = new javax.swing.JLabel(); + jLabel1 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Tabit"); setBackground(new java.awt.Color(0, 153, 255)); setIconImage(img.getImage()); setPreferredSize(new Dimension(xSize, ySize)); + jTable1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2)); jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, "YYYY/MM/DD", null, null, null, null, null, null} @@ -116,6 +120,9 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { loadInventory(jTable1, rows); }catch(SQLException e) { } + jButton1.setBackground(new java.awt.Color(0, 0, 153)); + jButton1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); jButton1.setText("Add Item"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -123,6 +130,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); + jButton2.setBackground(new java.awt.Color(0, 0, 153)); + jButton2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jButton2.setForeground(new java.awt.Color(255, 255, 255)); jButton2.setText("Save"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -130,7 +140,15 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); + jButton3.setBackground(new java.awt.Color(0, 0, 153)); + jButton3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jButton3.setForeground(new java.awt.Color(255, 255, 255)); jButton3.setText("Back"); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); jPanel1.setBackground(new java.awt.Color(153, 255, 255)); @@ -138,6 +156,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jTextArea1.setColumns(10); jTextArea1.setRows(5); jTextArea1.setWrapStyleWord(true); + jTextArea1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3)); jTextArea1.setFont(bfont); jTextArea1.setForeground(Color.blue); jScrollPane2.setViewportView(jTextArea1); @@ -146,19 +165,16 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() - .addGap(28, 28, 28) - .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 322, Short.MAX_VALUE) - .addGap(25, 25, 25)) + .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 366, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() - .addContainerGap() - .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE) - .addContainerGap()) + .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE) ); + jButton4.setBackground(new java.awt.Color(0, 0, 153)); + jButton4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jButton4.setForeground(new java.awt.Color(255, 255, 255)); jButton4.setText("Remove Row"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -166,6 +182,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); + jLabel1.setText("Tabit - Inventory"); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( @@ -173,40 +191,48 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 815, Short.MAX_VALUE) + .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jButton4)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jButton2, javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(jButton3, javax.swing.GroupLayout.Alignment.TRAILING)))) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(5, 5, 5) - .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(RestaurantLogoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE)))) + .addGap(5, 5, 5) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(RestaurantLogoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 360, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) + .addGroup(layout.createSequentialGroup() + .addGap(24, 24, 24) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); + + layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jButton1, jButton2, jButton3, jButton4}); + layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGap(78, 78, 78) + .addGap(27, 27, 27) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jButton1) - .addComponent(jButton2)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jButton4) - .addComponent(jButton3)) - .addGap(70, 70, 70)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) + .addGroup(layout.createSequentialGroup() + .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(11, 11, 11) + .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 43, Short.MAX_VALUE) + .addGap(11, 11, 11) + .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE))) + .addGap(39, 39, 39)) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(27, 27, 27) @@ -214,6 +240,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addContainerGap()))) ); + layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jButton1, jButton2, jButton3, jButton4}); + pack(); }//GEN-END:initComponents @@ -410,6 +438,12 @@ private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve } } }//GEN-LAST:event_jTable1MouseClicked + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed + // TODO add your handling code here: + ManagerProfile.main(args); + super.dispose(); + }//GEN-LAST:event_jButton3ActionPerformed void loadInventory(JTable jt, int rows) throws SQLException { ResultSet inventory = databit.getInventory(); int i = 0; @@ -491,6 +525,7 @@ public void run() { private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; private javax.swing.JButton jButton4; + private javax.swing.JLabel jLabel1; private javax.swing.JPanel jPanel1; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane2; diff --git a/desktop/src/desktop/ManagerProfile.form b/desktop/src/desktop/ManagerProfile.form index 286b777..c7c81c2 100644 --- a/desktop/src/desktop/ManagerProfile.form +++ b/desktop/src/desktop/ManagerProfile.form @@ -3,6 +3,7 @@ <Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> <Properties> <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Tabit"/> </Properties> <SyntheticProperties> <SyntheticProperty name="formSizePolicy" type="int" value="1"/> @@ -25,17 +26,22 @@ <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> <EmptySpace min="-2" pref="42" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" max="-2" attributes="0"> - <Component id="magagerLogOutButton" max="32767" attributes="0"/> - <Component id="viewFinancesButton" max="32767" attributes="0"/> - <Component id="modifyEmployeeButton" max="32767" attributes="0"/> - <Component id="modifyScheduleButton" max="32767" attributes="0"/> - <Component id="modifyInventoryButton" alignment="0" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace type="separate" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" max="-2" attributes="0"> - <Component id="jScrollPane1" pref="0" max="32767" attributes="0"/> - <Component id="clearTablesButton" pref="232" max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel1" min="-2" pref="126" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="magagerLogOutButton" max="32767" attributes="0"/> + <Component id="viewFinancesButton" max="32767" attributes="0"/> + <Component id="modifyEmployeeButton" max="32767" attributes="0"/> + <Component id="modifyScheduleButton" max="32767" attributes="0"/> + <Component id="modifyInventoryButton" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jScrollPane1" pref="0" max="32767" attributes="0"/> + <Component id="clearTablesButton" pref="232" max="32767" attributes="0"/> + </Group> + </Group> </Group> <EmptySpace pref="52" max="32767" attributes="0"/> </Group> @@ -43,8 +49,10 @@ </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace pref="48" max="32767" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel1" pref="18" max="32767" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Component id="modifyScheduleButton" alignment="1" min="-2" pref="57" max="-2" attributes="0"/> <Component id="clearTablesButton" alignment="1" min="-2" pref="61" max="-2" attributes="0"/> @@ -202,5 +210,10 @@ </Component> </SubComponents> </Container> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="text" type="java.lang.String" value="Tabit - Manager Profile"/> + </Properties> + </Component> </SubComponents> </Form> diff --git a/desktop/src/desktop/ManagerProfile.java b/desktop/src/desktop/ManagerProfile.java index f78c6aa..933171e 100644 --- a/desktop/src/desktop/ManagerProfile.java +++ b/desktop/src/desktop/ManagerProfile.java @@ -55,8 +55,10 @@ private void initComponents() {//GEN-BEGIN:initComponents modifyInventoryButton = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); tableJList = new javax.swing.JList(); + jLabel1 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Tabit"); modifyScheduleButton.setBackground(new java.awt.Color(0, 0, 153)); modifyScheduleButton.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N @@ -136,28 +138,35 @@ public void valueChanged(ListSelectionEvent e){ ); jScrollPane1.setViewportView(tableJList); + jLabel1.setText("Tabit - Manager Profile"); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(42, 42, 42) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(magagerLogOutButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(viewFinancesButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(modifyEmployeeButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(modifyScheduleButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(modifyInventoryButton)) - .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) - .addComponent(clearTablesButton, javax.swing.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(magagerLogOutButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(viewFinancesButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(modifyEmployeeButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(modifyScheduleButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(modifyInventoryButton)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addComponent(clearTablesButton, javax.swing.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)))) .addContainerGap(52, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addContainerGap(48, Short.MAX_VALUE) + .addContainerGap() + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 18, Short.MAX_VALUE) + .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(modifyScheduleButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(clearTablesButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)) @@ -198,7 +207,8 @@ private void magagerLogOutButtonActionPerformed(java.awt.event.ActionEvent evt) }//GEN-LAST:event_magagerLogOutButtonActionPerformed private void modifyInventoryButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_modifyInventoryButtonActionPerformed - + Inventory.main(args); + super.dispose(); }//GEN-LAST:event_modifyInventoryButtonActionPerformed private void viewTablesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewTablesButtonActionPerformed @@ -257,6 +267,7 @@ public void run() { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton clearTablesButton; + private javax.swing.JLabel jLabel1; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JButton magagerLogOutButton; private javax.swing.JButton modifyEmployeeButton; diff --git a/desktop/src/desktop/Schedule.form b/desktop/src/desktop/Schedule.form index c3f5a69..1954d03 100644 --- a/desktop/src/desktop/Schedule.form +++ b/desktop/src/desktop/Schedule.form @@ -3,7 +3,7 @@ <Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> <Properties> <Property name="defaultCloseOperation" type="int" value="3"/> - <Property name="title" type="java.lang.String" value="Tabit - Schedule"/> + <Property name="title" type="java.lang.String" value="Tabit "/> <Property name="iconImage" type="java.awt.Image" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> <Connection code="img.getImage()" type="code"/> </Property> @@ -29,7 +29,7 @@ <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> <EmptySpace max="-2" attributes="0"/> - <Component id="jScrollPane1" pref="854" max="32767" attributes="0"/> + <Component id="jScrollPane1" max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/> </Group> <Group type="102" alignment="1" attributes="0"> @@ -38,38 +38,40 @@ <Component id="jButton2" max="32767" attributes="0"/> <Component id="jButton4" max="32767" attributes="0"/> </Group> - <EmptySpace max="32767" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="jButton3" min="-2" max="-2" attributes="0"/> - <Component id="jButton1" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="531" max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jButton3" max="32767" attributes="0"/> + <Component id="jButton1" pref="98" max="32767" attributes="0"/> </Group> - <EmptySpace min="-2" pref="96" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="72" max="-2" attributes="0"/> </Group> <Group type="102" alignment="1" attributes="0"> <EmptySpace max="32767" attributes="0"/> <Component id="jLabel1" min="-2" pref="400" max="-2" attributes="0"/> - <EmptySpace max="32767" attributes="0"/> + <EmptySpace min="-2" pref="237" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="1" attributes="0"> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Component id="jLabel1" pref="51" max="32767" attributes="0"/> - <EmptySpace type="separate" min="-2" max="-2" attributes="0"/> - <Component id="jScrollPane1" pref="207" max="32767" attributes="0"/> - <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" pref="77" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jScrollPane1" min="-2" pref="216" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> + <Component id="jButton2" min="-2" pref="40" max="-2" attributes="0"/> + </Group> + <Component id="jButton1" min="-2" pref="37" max="-2" attributes="0"/> </Group> - <EmptySpace min="-2" pref="8" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="jButton3" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jButton4" alignment="3" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jButton4" pref="38" max="32767" attributes="0"/> + <Component id="jButton3" max="32767" attributes="0"/> </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -84,6 +86,11 @@ <SubComponents> <Component class="javax.swing.JTable" name="jTable1"> <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder thickness="2"/> + </Border> + </Property> <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> <Connection code="new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "Employee ID", "Employee", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" } ) { Class[] types = new Class [] { java.lang.Integer.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class }; public Class getColumnClass(int columnIndex) { return types [columnIndex]; } }" type="code"/> </Property> @@ -145,6 +152,15 @@ </Container> <Component class="javax.swing.JButton" name="jButton1"> <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="0" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> <Property name="text" type="java.lang.String" value="Save"/> </Properties> <Events> @@ -153,6 +169,15 @@ </Component> <Component class="javax.swing.JButton" name="jButton2"> <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="0" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> <Property name="text" type="java.lang.String" value="Add Employee"/> </Properties> <Events> @@ -161,6 +186,15 @@ </Component> <Component class="javax.swing.JButton" name="jButton3"> <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="0" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> <Property name="text" type="java.lang.String" value="Back"/> </Properties> <Events> @@ -183,6 +217,15 @@ </Component> <Component class="javax.swing.JButton" name="jButton4"> <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="0" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> <Property name="text" type="java.lang.String" value="Delete Row"/> </Properties> <Events> diff --git a/desktop/src/desktop/Schedule.java b/desktop/src/desktop/Schedule.java index edddecf..179c8cf 100644 --- a/desktop/src/desktop/Schedule.java +++ b/desktop/src/desktop/Schedule.java @@ -40,6 +40,7 @@ public class Schedule extends javax.swing.JFrame{ public Schedule() throws SQLException{ databit = new DataHandler(); initComponents(); + this.setLocationRelativeTo(getRootPane()); } /** This method is called from within the constructor to * initialize the form. @@ -67,9 +68,10 @@ private void initComponents() {//GEN-BEGIN:initComponents jButton4 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - setTitle("Tabit - Schedule"); + setTitle("Tabit "); setIconImage(img.getImage()); + jTable1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2)); jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { @@ -143,6 +145,9 @@ public void columnSelectionChanged(ListSelectionEvent e) { TableColumnModel columnModel = jTable1.getColumnModel(); columnModel.addColumnModelListener(tableColumnModelListener); + jButton1.setBackground(new java.awt.Color(0, 0, 153)); + jButton1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jButton1.setForeground(new java.awt.Color(255, 255, 255)); jButton1.setText("Save"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -150,6 +155,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); + jButton2.setBackground(new java.awt.Color(0, 0, 153)); + jButton2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jButton2.setForeground(new java.awt.Color(255, 255, 255)); jButton2.setText("Add Employee"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -157,6 +165,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); + jButton3.setBackground(new java.awt.Color(0, 0, 153)); + jButton3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jButton3.setForeground(new java.awt.Color(255, 255, 255)); jButton3.setText("Back"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -172,6 +183,9 @@ public void componentResized(java.awt.event.ComponentEvent evt) { } }); + jButton4.setBackground(new java.awt.Color(0, 0, 153)); + jButton4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jButton4.setForeground(new java.awt.Color(255, 255, 255)); jButton4.setText("Delete Row"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -185,39 +199,40 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() - .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 854, Short.MAX_VALUE) + .addComponent(jScrollPane1) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(42, 42, 42) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jButton3) - .addComponent(jButton1)) - .addGap(96, 96, 96)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 531, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 98, Short.MAX_VALUE)) + .addGap(72, 72, 72)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 400, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(237, 237, 237)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addContainerGap() - .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 51, Short.MAX_VALUE) - .addGap(18, 18, 18) - .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 207, Short.MAX_VALUE) + .addGap(6, 6, 6) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jButton2) - .addComponent(jButton1)) - .addGap(8, 8, 8) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jButton3) - .addComponent(jButton4)) - .addContainerGap()) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(layout.createSequentialGroup() + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(29, 29, 29) + .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(26, 26, 26) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, 38, Short.MAX_VALUE) + .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack();