├── Gym management system JAVA OOP GUI
├── Admin.java
├── AdminInfo.txt
├── Date.java
├── Gym.java
├── JFrameAccountMenu.form
├── JFrameAccountMenu.java
├── JFrameAddBooking.form
├── JFrameAddBooking.java
├── JFrameAddMachine.form
├── JFrameAddMachine.java
├── JFrameAddMember.form
├── JFrameAddMember.java
├── JFrameAddOutstandingBalAll.form
├── JFrameAddOutstandingBalAll.java
├── JFrameAddOutstandingBalSpecific.form
├── JFrameAddOutstandingBalSpecific.java
├── JFrameAddTrainer.form
├── JFrameAddTrainer.java
├── JFrameAdmin.form
├── JFrameAdmin.java
├── JFrameBookingMenu.form
├── JFrameBookingMenu.java
├── JFrameCancelBooking.form
├── JFrameCancelBooking.java
├── JFrameChangeCretendials.form
├── JFrameChangeCretendials.java
├── JFrameDeleteMachine.form
├── JFrameDeleteMachine.java
├── JFrameDeleteMember.form
├── JFrameDeleteMember.java
├── JFrameDeleteTrainer.form
├── JFrameDeleteTrainer.java
├── JFrameGenerateReport.form
├── JFrameGenerateReport.java
├── JFrameMachineMenu.form
├── JFrameMachineMenu.java
├── JFrameMainMenu.form
├── JFrameMainMenu.java
├── JFrameMemberMenu.form
├── JFrameMemberMenu.java
├── JFrameModifyMember.form
├── JFrameModifyMember.java
├── JFrameModifyTrainer.form
├── JFrameModifyTrainer.java
├── JFramePayOutstandingBalance.form
├── JFramePayOutstandingBalance.java
├── JFrameSearchMachine.form
├── JFrameSearchMachine.java
├── JFrameSearchMember.form
├── JFrameSearchMember.java
├── JFrameSearchTrainer.form
├── JFrameSearchTrainer.java
├── JFrameTrainerMenu.form
├── JFrameTrainerMenu.java
├── JFrameViewAllBookings.form
├── JFrameViewAllBookings.java
├── JFrameViewAllMachines.form
├── JFrameViewAllMachines.java
├── JFrameViewAllMembers.form
├── JFrameViewAllMembers.java
├── JFrameViewAllTrainers.form
├── JFrameViewAllTrainers.java
├── Machine.java
├── Member.java
├── Payment.java
├── Person.java
├── Report.java
└── Trainer.java
├── Project Code zip file.rar
├── Project Report.pdf
├── README.md
├── ScreenShots of System
├── Add Machine.PNG
├── Add Member.PNG
├── Add Trainer.PNG
├── Add balance to all.PNG
├── Add balance to specific.PNG
├── Booking menu.PNG
├── Cancel booking.PNG
├── Change login.PNG
├── Delete machine.PNG
├── Delete trainer.PNG
├── Machine menu.PNG
├── Main menu.PNG
├── Member menu.PNG
├── Modify Trainer.jpg
├── Modify member.PNG
├── Pay outstanding balance.PNG
├── Report menu.PNG
├── Search Machine info.PNG
├── Search Member info.PNG
├── Search Trainer info.PNG
├── Trainer menu.PNG
├── View all booking.PNG
├── View all machines.PNG
├── View all members.PNG
├── View all trainers.PNG
├── accounts menu.PNG
├── add booking.PNG
├── delete member.PNG
└── login.PNG
└── UML Diagram.pdf
/Gym management system JAVA OOP GUI/Admin.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 |
3 | import java.io.*;
4 | import java.util.*;
5 | class Admin {
6 | private final String AdminInfo[] = new String[2];
7 | public Admin() throws IOException {
8 | super();
9 | updateAdminInfoArray();
10 | }
11 | @Override
12 | public String toString(){
13 | return "\n\t\tAdmin Details : " + super.toString() + "\n\n> User Name : " + "****" + "\n\n> Password : " + "****"
14 | + "\n---------------------------------------------------------------\n" ;
15 | }
16 | //...............................Storing data from AdminInfo file to AdminInfo array.......................
17 | private void updateAdminInfoArray() throws IOException{
18 | while(true){
19 | try {
20 | File a4 = new File("AdminInfo.txt");
21 | Scanner in = new Scanner(a4);
22 | String de = in.nextLine();
23 | String[] adInfo = de.split("#");
24 | for (int i = 0; i < AdminInfo.length; i++)
25 | AdminInfo[i] = adInfo[i];
26 | break;
27 | } catch (FileNotFoundException e) {
28 | OutputStream os = new FileOutputStream("AdminInfo.txt");
29 | PrintWriter put = new PrintWriter(os);
30 | for (int i = 0 ; i < 2; i++){
31 | if(i==0){
32 | put.print("admin#");
33 | }
34 | else{
35 | put.print("anything#");}
36 | }
37 | put.close();
38 | continue;
39 | } catch (IndexOutOfBoundsException e) {
40 | }
41 | }
42 | }
43 |
44 | //...............Login Validation................
45 | public boolean validateLogin(String userName, String password){
46 | boolean loginSuccessful = false;
47 | if(userName.equals(AdminInfo[0])){
48 | if(password.equals(AdminInfo[1])){
49 | loginSuccessful= true;
50 | }
51 | }
52 | return loginSuccessful;
53 | }
54 |
55 | //...............Update Login Option................
56 | public void modifyData(String newUsername, String newPassword){
57 | AdminInfo[0] = newUsername;
58 | AdminInfo[1] = newPassword;
59 | try{
60 | PrintWriter myFile = new PrintWriter("AdminInfo.txt");
61 | for(int i = 0;i< AdminInfo.length;i++) {
62 | myFile.print(AdminInfo[i]+"#");
63 | }
64 | myFile.close();
65 | }catch(FileNotFoundException e) {
66 | System.out.println("\n\t\tFile not found.... Sorry we are Closing Program\n");
67 | System.exit(1);
68 | }catch(IndexOutOfBoundsException e) {
69 | System.out.println("\n\t\tIndex out of bound exception...Sorry we are Closing Program\n");
70 | System.exit(1);
71 | }
72 | }
73 | }
74 |
75 |
76 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/AdminInfo.txt:
--------------------------------------------------------------------------------
1 | admin#anything#
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/Date.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import java.io.*;
3 | class Date implements Serializable{
4 | private int day;
5 | private int month;
6 | private int year;
7 | public Date(){
8 | day = 0;
9 | month = 0;
10 | year = 0;
11 | }
12 | public Date(int theMonth, int theDay, int theYear){
13 | month = theMonth;
14 | day = theDay;
15 | year = theYear;
16 | }
17 | public boolean checkDay(int testDay, int month) {
18 | int daysofmonth[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
19 | if (testDay > 0 && testDay <= daysofmonth[month]) {
20 | return true;
21 | } else if (month == 2 && testDay == 29 && (year % 400 == 0 || (year % 4 == 0 && year % 100 != 0))) {
22 | return true;
23 | }
24 | return false;
25 | }
26 | public void setDay(int day){
27 | this.day = day;
28 | }
29 | public void setMonth(int month){
30 | this.month = month;
31 | }
32 | public void setYear(int year){
33 | this.year = year;
34 | }
35 | public int getMonth(){
36 | return month;
37 | }
38 | public int getDay(){
39 | return day;
40 | }
41 | public int getYear(){
42 | return year;
43 | }
44 | @Override
45 | public String toString() {
46 | return month + "/" + day + "/" + year;
47 | }
48 | }
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameAddOutstandingBalAll.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
150 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameAddOutstandingBalAll.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import java.io.IOException;
3 | import javax.swing.*;
4 | public class JFrameAddOutstandingBalAll extends javax.swing.JFrame {
5 |
6 | Payment payment = new Payment();
7 | Gym gym = new Gym();
8 | public JFrameAddOutstandingBalAll() {
9 | initComponents();
10 | }
11 | @SuppressWarnings("unchecked")
12 | // //GEN-BEGIN:initComponents
13 | private void initComponents() {
14 |
15 | jPanel1 = new javax.swing.JPanel();
16 | btnBack = new javax.swing.JButton();
17 | txtBalance = new javax.swing.JTextField();
18 | jLabel1 = new javax.swing.JLabel();
19 | btnAdd = new javax.swing.JButton();
20 |
21 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
22 |
23 | jPanel1.setBackground(new java.awt.Color(35, 43, 42));
24 |
25 | btnBack.setBackground(new java.awt.Color(17, 122, 102));
26 | btnBack.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
27 | btnBack.setForeground(new java.awt.Color(255, 255, 255));
28 | btnBack.setText("BACK");
29 | btnBack.addActionListener(new java.awt.event.ActionListener() {
30 | public void actionPerformed(java.awt.event.ActionEvent evt) {
31 | btnBackActionPerformed(evt);
32 | }
33 | });
34 |
35 | txtBalance.setBackground(new java.awt.Color(35, 43, 42));
36 | txtBalance.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
37 | txtBalance.setForeground(new java.awt.Color(255, 255, 255));
38 | txtBalance.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 255, 255)));
39 |
40 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
41 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
42 | jLabel1.setText("Enter amount to add:");
43 |
44 | btnAdd.setBackground(new java.awt.Color(17, 122, 102));
45 | btnAdd.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
46 | btnAdd.setForeground(new java.awt.Color(255, 255, 255));
47 | btnAdd.setText("ADD");
48 | btnAdd.addActionListener(new java.awt.event.ActionListener() {
49 | public void actionPerformed(java.awt.event.ActionEvent evt) {
50 | btnAddActionPerformed(evt);
51 | }
52 | });
53 |
54 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
55 | jPanel1.setLayout(jPanel1Layout);
56 | jPanel1Layout.setHorizontalGroup(
57 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
58 | .addGroup(jPanel1Layout.createSequentialGroup()
59 | .addGap(29, 29, 29)
60 | .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
61 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
62 | .addComponent(txtBalance, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)
63 | .addContainerGap(36, Short.MAX_VALUE))
64 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
65 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
66 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
67 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
68 | .addComponent(btnAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
69 | .addGap(59, 59, 59))
70 | );
71 | jPanel1Layout.setVerticalGroup(
72 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
73 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
74 | .addContainerGap(48, Short.MAX_VALUE)
75 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
76 | .addComponent(jLabel1)
77 | .addComponent(txtBalance, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
78 | .addGap(18, 18, 18)
79 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
80 | .addComponent(btnBack, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
81 | .addComponent(btnAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
82 | .addGap(38, 38, 38))
83 | );
84 |
85 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
86 | getContentPane().setLayout(layout);
87 | layout.setHorizontalGroup(
88 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
89 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
90 | );
91 | layout.setVerticalGroup(
92 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
93 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
94 | );
95 |
96 | pack();
97 | }// //GEN-END:initComponents
98 |
99 | private void btnAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddActionPerformed
100 | String balance = txtBalance.getText();
101 | if(!balance.isEmpty()){
102 | if(payment.checkNumberIsdouble(balance)){
103 | for(Member m : gym.getMembers()){
104 | m.getPayment().addOutstandingBalance(Double.parseDouble(balance));
105 | }
106 | JOptionPane.showMessageDialog(null, "Balance Added Successfully to All.");
107 | txtBalance.setText("");
108 | gym.saveMemberFile();
109 |
110 | } else{
111 | JOptionPane.showMessageDialog(null, "Balance should be in numbers.");
112 | }
113 | } else{
114 | JOptionPane.showMessageDialog(null, "Enter the balance first before adding.");
115 | }
116 | }//GEN-LAST:event_btnAddActionPerformed
117 |
118 | private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackActionPerformed
119 | dispose();
120 | JFrameAccountMenu accounts = new JFrameAccountMenu();
121 | accounts.setVisible(true);
122 |
123 | }//GEN-LAST:event_btnBackActionPerformed
124 |
125 | /**
126 | * @param args the command line arguments
127 | */
128 | public static void main(String args[]) {
129 | /* Set the Nimbus look and feel */
130 | //
131 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
132 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
133 | */
134 | try {
135 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
136 | if ("Nimbus".equals(info.getName())) {
137 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
138 | break;
139 | }
140 | }
141 | } catch (ClassNotFoundException ex) {
142 | java.util.logging.Logger.getLogger(JFrameAddOutstandingBalAll.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
143 | } catch (InstantiationException ex) {
144 | java.util.logging.Logger.getLogger(JFrameAddOutstandingBalAll.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
145 | } catch (IllegalAccessException ex) {
146 | java.util.logging.Logger.getLogger(JFrameAddOutstandingBalAll.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
147 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
148 | java.util.logging.Logger.getLogger(JFrameAddOutstandingBalAll.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
149 | }
150 | //
151 | //
152 | //
153 | //
154 |
155 | /* Create and display the form */
156 | java.awt.EventQueue.invokeLater(new Runnable() {
157 | public void run() {
158 | new JFrameAddOutstandingBalAll().setVisible(true);
159 | }
160 | });
161 | }
162 |
163 | // Variables declaration - do not modify//GEN-BEGIN:variables
164 | private javax.swing.JButton btnAdd;
165 | private javax.swing.JButton btnBack;
166 | private javax.swing.JLabel jLabel1;
167 | private javax.swing.JPanel jPanel1;
168 | private javax.swing.JTextField txtBalance;
169 | // End of variables declaration//GEN-END:variables
170 | }
171 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameBookingMenu.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import javax.swing.*;
3 | public class JFrameBookingMenu extends javax.swing.JFrame {
4 | public JFrameBookingMenu() {
5 | initComponents();
6 | }
7 | @SuppressWarnings("unchecked")
8 | // //GEN-BEGIN:initComponents
9 | private void initComponents() {
10 |
11 | jPanel1 = new javax.swing.JPanel();
12 | jLabel9 = new javax.swing.JLabel();
13 | jLabel1 = new javax.swing.JLabel();
14 | btnBack = new javax.swing.JButton();
15 | jLabel3 = new javax.swing.JLabel();
16 | txtMenuOption = new javax.swing.JTextField();
17 | jLabel6 = new javax.swing.JLabel();
18 | btnEnter2 = new javax.swing.JButton();
19 | iLabel1 = new javax.swing.JLabel();
20 |
21 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
22 |
23 | jPanel1.setBackground(new java.awt.Color(35, 43, 42));
24 |
25 | jLabel9.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
26 | jLabel9.setForeground(new java.awt.Color(255, 255, 255));
27 | jLabel9.setText("1. Book Machine");
28 |
29 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
30 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
31 | jLabel1.setText("3. View all bookings");
32 |
33 | btnBack.setBackground(new java.awt.Color(17, 122, 102));
34 | btnBack.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
35 | btnBack.setForeground(new java.awt.Color(255, 255, 255));
36 | btnBack.setText("Back");
37 | btnBack.setBorder(null);
38 | btnBack.addActionListener(new java.awt.event.ActionListener() {
39 | public void actionPerformed(java.awt.event.ActionEvent evt) {
40 | btnBackActionPerformed(evt);
41 | }
42 | });
43 |
44 | jLabel3.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
45 | jLabel3.setForeground(new java.awt.Color(255, 255, 255));
46 | jLabel3.setText("2. Cancel Booking");
47 |
48 | txtMenuOption.setBackground(new java.awt.Color(35, 43, 42));
49 | txtMenuOption.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
50 | txtMenuOption.setForeground(new java.awt.Color(255, 255, 255));
51 | txtMenuOption.setHorizontalAlignment(javax.swing.JTextField.LEFT);
52 | txtMenuOption.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 255, 255)));
53 | txtMenuOption.addActionListener(new java.awt.event.ActionListener() {
54 | public void actionPerformed(java.awt.event.ActionEvent evt) {
55 | txtMenuOptionActionPerformed(evt);
56 | }
57 | });
58 |
59 | jLabel6.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
60 | jLabel6.setForeground(new java.awt.Color(255, 255, 255));
61 | jLabel6.setText("Choose Option :");
62 |
63 | btnEnter2.setBackground(new java.awt.Color(17, 122, 102));
64 | btnEnter2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
65 | btnEnter2.setForeground(new java.awt.Color(255, 255, 255));
66 | btnEnter2.setText("Enter");
67 | btnEnter2.setBorder(null);
68 | btnEnter2.addActionListener(new java.awt.event.ActionListener() {
69 | public void actionPerformed(java.awt.event.ActionEvent evt) {
70 | btnEnter2ActionPerformed(evt);
71 | }
72 | });
73 |
74 | iLabel1.setFont(new java.awt.Font("Tahoma", 1, 22)); // NOI18N
75 | iLabel1.setForeground(new java.awt.Color(255, 255, 255));
76 | iLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
77 | iLabel1.setText("Booking Menu");
78 |
79 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
80 | jPanel1.setLayout(jPanel1Layout);
81 | jPanel1Layout.setHorizontalGroup(
82 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
83 | .addComponent(iLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
84 | .addGroup(jPanel1Layout.createSequentialGroup()
85 | .addGap(24, 24, 24)
86 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
87 | .addComponent(jLabel1)
88 | .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
89 | .addGap(18, 18, 18)
90 | .addComponent(jLabel3)
91 | .addContainerGap(68, Short.MAX_VALUE))
92 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
93 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
94 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
95 | .addGroup(jPanel1Layout.createSequentialGroup()
96 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
97 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
98 | .addComponent(btnEnter2, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE))
99 | .addGroup(jPanel1Layout.createSequentialGroup()
100 | .addComponent(jLabel6)
101 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
102 | .addComponent(txtMenuOption, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))
103 | .addGap(71, 71, 71))
104 | );
105 | jPanel1Layout.setVerticalGroup(
106 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
107 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
108 | .addGap(22, 22, 22)
109 | .addComponent(iLabel1)
110 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)
111 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
112 | .addComponent(jLabel9)
113 | .addComponent(jLabel3))
114 | .addGap(18, 18, 18)
115 | .addComponent(jLabel1)
116 | .addGap(18, 18, 18)
117 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
118 | .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
119 | .addComponent(txtMenuOption, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
120 | .addGap(26, 26, 26)
121 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
122 | .addComponent(btnEnter2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
123 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
124 | .addGap(30, 30, 30))
125 | );
126 |
127 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
128 | getContentPane().setLayout(layout);
129 | layout.setHorizontalGroup(
130 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
131 | .addGroup(layout.createSequentialGroup()
132 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
133 | .addGap(0, 0, Short.MAX_VALUE))
134 | );
135 | layout.setVerticalGroup(
136 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
137 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
138 | );
139 |
140 | pack();
141 | }// //GEN-END:initComponents
142 |
143 | private void txtMenuOptionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtMenuOptionActionPerformed
144 | // TODO add your handling code here:
145 | }//GEN-LAST:event_txtMenuOptionActionPerformed
146 |
147 | private void btnEnter2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEnter2ActionPerformed
148 | String option = txtMenuOption.getText();
149 | if (option.equals("1") || option.equals("2") || option.equals("3")){
150 | switch(option){
151 | case "1":
152 | dispose();
153 | JFrameAddBooking addBooking = new JFrameAddBooking();
154 | addBooking.setVisible(true);
155 | break;
156 | case "2":
157 | dispose();
158 | JFrameCancelBooking cancelBooking = new JFrameCancelBooking();
159 | cancelBooking.setVisible(true);
160 | break;
161 | case "3":
162 | dispose();
163 | JFrameViewAllBookings viewAllBookings = new JFrameViewAllBookings();
164 | viewAllBookings.setVisible(true);
165 | break;
166 |
167 | }
168 | } else{
169 | JOptionPane.showMessageDialog(null, "You enter wrong choice, enter again.");
170 | }
171 | }//GEN-LAST:event_btnEnter2ActionPerformed
172 |
173 | private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackActionPerformed
174 | dispose();
175 | JFrameMainMenu mainMenu = new JFrameMainMenu();
176 | mainMenu.setVisible(true);
177 | }//GEN-LAST:event_btnBackActionPerformed
178 |
179 | public static void main(String args[]) {
180 | java.awt.EventQueue.invokeLater(new Runnable() {
181 | public void run() {
182 | new JFrameBookingMenu().setVisible(true);
183 | }
184 | });
185 | }
186 |
187 | // Variables declaration - do not modify//GEN-BEGIN:variables
188 | private javax.swing.JButton btnBack;
189 | private javax.swing.JButton btnEnter2;
190 | private javax.swing.JLabel iLabel1;
191 | private javax.swing.JLabel jLabel1;
192 | private javax.swing.JLabel jLabel3;
193 | private javax.swing.JLabel jLabel6;
194 | private javax.swing.JLabel jLabel9;
195 | private javax.swing.JPanel jPanel1;
196 | private javax.swing.JTextField txtMenuOption;
197 | // End of variables declaration//GEN-END:variables
198 | }
199 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameChangeCretendials.java:
--------------------------------------------------------------------------------
1 |
2 | package project_oop;
3 |
4 | import java.io.IOException;
5 | import javax.swing.JOptionPane;
6 |
7 | public class JFrameChangeCretendials extends javax.swing.JFrame {
8 |
9 | Admin ad;
10 | public JFrameChangeCretendials() {
11 | initComponents();
12 | }
13 |
14 |
15 | @SuppressWarnings("unchecked")
16 | // //GEN-BEGIN:initComponents
17 | private void initComponents() {
18 |
19 | jScrollBar1 = new javax.swing.JScrollBar();
20 | jPanel1 = new javax.swing.JPanel();
21 | txtNewUsername = new javax.swing.JTextField();
22 | jLabel2 = new javax.swing.JLabel();
23 | txtNewPassword = new javax.swing.JPasswordField();
24 | btnUpdate = new javax.swing.JButton();
25 | jLabel3 = new javax.swing.JLabel();
26 | txtConfirmPassword = new javax.swing.JPasswordField();
27 | jLabel1 = new javax.swing.JLabel();
28 |
29 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
30 |
31 | jPanel1.setBackground(new java.awt.Color(35, 43, 42));
32 |
33 | txtNewUsername.setBackground(new java.awt.Color(35, 43, 42));
34 | txtNewUsername.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
35 | txtNewUsername.setForeground(new java.awt.Color(255, 255, 255));
36 | txtNewUsername.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 255, 255)));
37 | txtNewUsername.addActionListener(new java.awt.event.ActionListener() {
38 | public void actionPerformed(java.awt.event.ActionEvent evt) {
39 | txtNewUsernameActionPerformed(evt);
40 | }
41 | });
42 |
43 | jLabel2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
44 | jLabel2.setForeground(new java.awt.Color(255, 255, 255));
45 | jLabel2.setText("New Password");
46 |
47 | txtNewPassword.setBackground(new java.awt.Color(35, 43, 42));
48 | txtNewPassword.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
49 | txtNewPassword.setForeground(new java.awt.Color(255, 255, 255));
50 | txtNewPassword.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 255, 255)));
51 | txtNewPassword.addActionListener(new java.awt.event.ActionListener() {
52 | public void actionPerformed(java.awt.event.ActionEvent evt) {
53 | txtNewPasswordActionPerformed(evt);
54 | }
55 | });
56 |
57 | btnUpdate.setBackground(new java.awt.Color(17, 122, 102));
58 | btnUpdate.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
59 | btnUpdate.setForeground(new java.awt.Color(255, 255, 255));
60 | btnUpdate.setText("Update");
61 | btnUpdate.setBorder(null);
62 | btnUpdate.addActionListener(new java.awt.event.ActionListener() {
63 | public void actionPerformed(java.awt.event.ActionEvent evt) {
64 | btnUpdateActionPerformed(evt);
65 | }
66 | });
67 |
68 | jLabel3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
69 | jLabel3.setForeground(new java.awt.Color(255, 255, 255));
70 | jLabel3.setText("Confirm Password");
71 |
72 | txtConfirmPassword.setBackground(new java.awt.Color(35, 43, 42));
73 | txtConfirmPassword.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
74 | txtConfirmPassword.setForeground(new java.awt.Color(255, 255, 255));
75 | txtConfirmPassword.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 255, 255)));
76 | txtConfirmPassword.addActionListener(new java.awt.event.ActionListener() {
77 | public void actionPerformed(java.awt.event.ActionEvent evt) {
78 | txtConfirmPasswordActionPerformed(evt);
79 | }
80 | });
81 |
82 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
83 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
84 | jLabel1.setText("New Username");
85 |
86 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
87 | jPanel1.setLayout(jPanel1Layout);
88 | jPanel1Layout.setHorizontalGroup(
89 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
90 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
91 | .addContainerGap(62, Short.MAX_VALUE)
92 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
93 | .addComponent(btnUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE)
94 | .addComponent(jLabel1)
95 | .addComponent(jLabel2)
96 | .addComponent(txtNewUsername, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE)
97 | .addComponent(txtNewPassword, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)
98 | .addComponent(jLabel3)
99 | .addComponent(txtConfirmPassword, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE))
100 | .addGap(58, 58, 58))
101 | );
102 | jPanel1Layout.setVerticalGroup(
103 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
104 | .addGroup(jPanel1Layout.createSequentialGroup()
105 | .addGap(48, 48, 48)
106 | .addComponent(jLabel1)
107 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
108 | .addComponent(txtNewUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
109 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
110 | .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
111 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
112 | .addComponent(txtNewPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
113 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
114 | .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
115 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
116 | .addComponent(txtConfirmPassword)
117 | .addGap(18, 18, 18)
118 | .addComponent(btnUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
119 | .addGap(58, 58, 58))
120 | );
121 |
122 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
123 | getContentPane().setLayout(layout);
124 | layout.setHorizontalGroup(
125 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
126 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
127 | );
128 | layout.setVerticalGroup(
129 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
130 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
131 | );
132 |
133 | pack();
134 | }// //GEN-END:initComponents
135 |
136 | private void txtNewUsernameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNewUsernameActionPerformed
137 |
138 | }//GEN-LAST:event_txtNewUsernameActionPerformed
139 |
140 | private void txtNewPasswordActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNewPasswordActionPerformed
141 |
142 | }//GEN-LAST:event_txtNewPasswordActionPerformed
143 |
144 | private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUpdateActionPerformed
145 | try{
146 | ad = new Admin();
147 | String newName = txtNewUsername.getText();
148 | String newPass = txtNewPassword.getText();
149 | String confirmPass = txtConfirmPassword.getText();
150 | if(!(newName.equals(""))){
151 | if(newPass.equals(confirmPass)){
152 | ad.modifyData(newName, newPass);
153 | JOptionPane.showMessageDialog(null, "Username and password updated succesfully.");
154 | dispose();
155 | JFrameAdmin admin = new JFrameAdmin();
156 | admin.setVisible(true);
157 | } else{
158 | JOptionPane.showMessageDialog(null, "Confrim password not same, enter again.");
159 | }
160 | } else{
161 | JOptionPane.showMessageDialog(null, "Enter Username first");
162 | }
163 | } catch(IOException e){
164 |
165 | }
166 |
167 |
168 | }//GEN-LAST:event_btnUpdateActionPerformed
169 |
170 | private void txtConfirmPasswordActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtConfirmPasswordActionPerformed
171 | // TODO add your handling code here:
172 | }//GEN-LAST:event_txtConfirmPasswordActionPerformed
173 |
174 | /**
175 | * @param args the command line arguments
176 | */
177 | public static void main(String args[]) {
178 | /* Set the Nimbus look and feel */
179 | //
180 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
181 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
182 | */
183 | try {
184 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
185 | if ("Nimbus".equals(info.getName())) {
186 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
187 | break;
188 | }
189 | }
190 | } catch (ClassNotFoundException ex) {
191 | java.util.logging.Logger.getLogger(JFrameChangeCretendials.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
192 | } catch (InstantiationException ex) {
193 | java.util.logging.Logger.getLogger(JFrameChangeCretendials.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
194 | } catch (IllegalAccessException ex) {
195 | java.util.logging.Logger.getLogger(JFrameChangeCretendials.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
196 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
197 | java.util.logging.Logger.getLogger(JFrameChangeCretendials.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
198 | }
199 | //
200 |
201 | /* Create and display the form */
202 | java.awt.EventQueue.invokeLater(new Runnable() {
203 | public void run() {
204 | new JFrameChangeCretendials().setVisible(true);
205 | }
206 | });
207 | }
208 |
209 | // Variables declaration - do not modify//GEN-BEGIN:variables
210 | private javax.swing.JButton btnUpdate;
211 | private javax.swing.JLabel jLabel1;
212 | private javax.swing.JLabel jLabel2;
213 | private javax.swing.JLabel jLabel3;
214 | private javax.swing.JPanel jPanel1;
215 | private javax.swing.JScrollBar jScrollBar1;
216 | private javax.swing.JPasswordField txtConfirmPassword;
217 | private javax.swing.JPasswordField txtNewPassword;
218 | private javax.swing.JTextField txtNewUsername;
219 | // End of variables declaration//GEN-END:variables
220 | }
221 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameDeleteMachine.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
202 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameDeleteMachine.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import javax.swing.*;
3 | public class JFrameDeleteMachine extends javax.swing.JFrame {
4 | Gym gym = new Gym();
5 | public JFrameDeleteMachine() {
6 | initComponents();
7 | txtRemoveMachine.setEditable(false);
8 | }
9 | @SuppressWarnings("unchecked")
10 | // //GEN-BEGIN:initComponents
11 | private void initComponents() {
12 |
13 | jPanel1 = new javax.swing.JPanel();
14 | jLabel1 = new javax.swing.JLabel();
15 | txtRegNo = new javax.swing.JTextField();
16 | jLabel2 = new javax.swing.JLabel();
17 | txtRemoveMachine = new javax.swing.JTextField();
18 | btnRemove = new javax.swing.JButton();
19 | btnBack = new javax.swing.JButton();
20 |
21 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
22 |
23 | jPanel1.setBackground(new java.awt.Color(35, 43, 42));
24 |
25 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 22)); // NOI18N
26 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
27 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
28 | jLabel1.setText("Delete Machine");
29 |
30 | txtRegNo.setBackground(new java.awt.Color(35, 43, 42));
31 | txtRegNo.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
32 | txtRegNo.setForeground(new java.awt.Color(255, 255, 255));
33 | txtRegNo.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 255, 255)));
34 | txtRegNo.addActionListener(new java.awt.event.ActionListener() {
35 | public void actionPerformed(java.awt.event.ActionEvent evt) {
36 | txtRegNoActionPerformed(evt);
37 | }
38 | });
39 |
40 | jLabel2.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
41 | jLabel2.setForeground(new java.awt.Color(255, 255, 255));
42 | jLabel2.setText("Registration Num : ");
43 |
44 | txtRemoveMachine.setBackground(new java.awt.Color(35, 43, 42));
45 | txtRemoveMachine.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N
46 | txtRemoveMachine.setForeground(new java.awt.Color(255, 255, 255));
47 | txtRemoveMachine.setHorizontalAlignment(javax.swing.JTextField.CENTER);
48 |
49 | btnRemove.setBackground(new java.awt.Color(17, 122, 102));
50 | btnRemove.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
51 | btnRemove.setForeground(new java.awt.Color(255, 255, 255));
52 | btnRemove.setText("REMOVE");
53 | btnRemove.setBorder(null);
54 | btnRemove.addActionListener(new java.awt.event.ActionListener() {
55 | public void actionPerformed(java.awt.event.ActionEvent evt) {
56 | btnRemoveActionPerformed(evt);
57 | }
58 | });
59 |
60 | btnBack.setBackground(new java.awt.Color(17, 122, 102));
61 | btnBack.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
62 | btnBack.setForeground(new java.awt.Color(255, 255, 255));
63 | btnBack.setText("GO BACK");
64 | btnBack.setBorder(null);
65 | btnBack.addActionListener(new java.awt.event.ActionListener() {
66 | public void actionPerformed(java.awt.event.ActionEvent evt) {
67 | btnBackActionPerformed(evt);
68 | }
69 | });
70 |
71 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
72 | jPanel1.setLayout(jPanel1Layout);
73 | jPanel1Layout.setHorizontalGroup(
74 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
75 | .addGroup(jPanel1Layout.createSequentialGroup()
76 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
77 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
78 | .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 426, javax.swing.GroupLayout.PREFERRED_SIZE)
79 | .addGroup(jPanel1Layout.createSequentialGroup()
80 | .addGap(24, 24, 24)
81 | .addComponent(jLabel2)
82 | .addGap(18, 18, 18)
83 | .addComponent(txtRegNo, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE)
84 | .addGap(58, 58, 58))
85 | .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
86 | .addContainerGap()
87 | .addComponent(txtRemoveMachine, javax.swing.GroupLayout.PREFERRED_SIZE, 394, javax.swing.GroupLayout.PREFERRED_SIZE)))
88 | .addGroup(jPanel1Layout.createSequentialGroup()
89 | .addGap(62, 62, 62)
90 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
91 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
92 | .addComponent(btnRemove, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)))
93 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
94 | );
95 | jPanel1Layout.setVerticalGroup(
96 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
97 | .addGroup(jPanel1Layout.createSequentialGroup()
98 | .addGap(12, 12, 12)
99 | .addComponent(jLabel1)
100 | .addGap(18, 18, 18)
101 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
102 | .addComponent(jLabel2)
103 | .addComponent(txtRegNo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
104 | .addGap(18, 18, 18)
105 | .addComponent(txtRemoveMachine, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
106 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
107 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
108 | .addComponent(btnBack, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
109 | .addComponent(btnRemove, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))
110 | .addContainerGap(20, Short.MAX_VALUE))
111 | );
112 |
113 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
114 | getContentPane().setLayout(layout);
115 | layout.setHorizontalGroup(
116 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
117 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
118 | .addGap(0, 0, Short.MAX_VALUE)
119 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 409, javax.swing.GroupLayout.PREFERRED_SIZE))
120 | );
121 | layout.setVerticalGroup(
122 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
123 | .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
124 | );
125 |
126 | pack();
127 | }// //GEN-END:initComponents
128 |
129 | private void btnRemoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveActionPerformed
130 | String regId = txtRegNo.getText();
131 | if(!(regId.isEmpty())){
132 | if(gym.checkNumberIsInt(regId)){
133 | String machineData = gym.deleteMachine(Integer.parseInt(regId));
134 | txtRemoveMachine.setText(machineData);
135 | txtRemoveMachine.setEditable(false);
136 | } else{
137 | JOptionPane.showMessageDialog(null, "Reg id should be in numbers, then search");
138 | }
139 | } else{
140 | JOptionPane.showMessageDialog(null, "First enter the reg Id, then search");
141 | }
142 | }//GEN-LAST:event_btnRemoveActionPerformed
143 |
144 | private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackActionPerformed
145 | dispose();
146 | JFrameMachineMenu machineMenu = new JFrameMachineMenu();
147 | machineMenu.setVisible(true);
148 | }//GEN-LAST:event_btnBackActionPerformed
149 |
150 | private void txtRegNoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtRegNoActionPerformed
151 |
152 | }//GEN-LAST:event_txtRegNoActionPerformed
153 |
154 | public static void main(String args[]) {
155 | java.awt.EventQueue.invokeLater(new Runnable() {
156 | public void run() {
157 | new JFrameDeleteMachine().setVisible(true);
158 | }
159 | });
160 | }
161 | // Variables declaration - do not modify//GEN-BEGIN:variables
162 | private javax.swing.JButton btnBack;
163 | private javax.swing.JButton btnRemove;
164 | private javax.swing.JLabel jLabel1;
165 | private javax.swing.JLabel jLabel2;
166 | private javax.swing.JPanel jPanel1;
167 | private javax.swing.JTextField txtRegNo;
168 | private javax.swing.JTextField txtRemoveMachine;
169 | // End of variables declaration//GEN-END:variables
170 | }
171 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameDeleteMember.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import javax.swing.*;
3 | public class JFrameDeleteMember extends javax.swing.JFrame {
4 | Gym gym = new Gym();
5 | public JFrameDeleteMember() {
6 | initComponents();
7 | txtRemoveMember.setEditable(false);
8 | }
9 | @SuppressWarnings("unchecked")
10 | // //GEN-BEGIN:initComponents
11 | private void initComponents() {
12 |
13 | jPanel1 = new javax.swing.JPanel();
14 | txtRegNo = new javax.swing.JTextField();
15 | jLabel2 = new javax.swing.JLabel();
16 | txtRemoveMember = new javax.swing.JTextField();
17 | btnRemove = new javax.swing.JButton();
18 | btnBack = new javax.swing.JButton();
19 | jLabel1 = new javax.swing.JLabel();
20 |
21 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
22 |
23 | jPanel1.setBackground(new java.awt.Color(35, 43, 42));
24 |
25 | txtRegNo.setBackground(new java.awt.Color(35, 43, 42));
26 | txtRegNo.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
27 | txtRegNo.setForeground(new java.awt.Color(255, 255, 255));
28 | txtRegNo.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 255, 255)));
29 | txtRegNo.addActionListener(new java.awt.event.ActionListener() {
30 | public void actionPerformed(java.awt.event.ActionEvent evt) {
31 | txtRegNoActionPerformed(evt);
32 | }
33 | });
34 |
35 | jLabel2.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
36 | jLabel2.setForeground(new java.awt.Color(255, 255, 255));
37 | jLabel2.setText("Registration Num : ");
38 |
39 | txtRemoveMember.setBackground(new java.awt.Color(35, 43, 42));
40 | txtRemoveMember.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N
41 | txtRemoveMember.setForeground(new java.awt.Color(255, 255, 255));
42 | txtRemoveMember.setHorizontalAlignment(javax.swing.JTextField.CENTER);
43 |
44 | btnRemove.setBackground(new java.awt.Color(17, 122, 102));
45 | btnRemove.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
46 | btnRemove.setForeground(new java.awt.Color(255, 255, 255));
47 | btnRemove.setText("REMOVE");
48 | btnRemove.setBorder(null);
49 | btnRemove.setPreferredSize(new java.awt.Dimension(77, 27));
50 | btnRemove.addActionListener(new java.awt.event.ActionListener() {
51 | public void actionPerformed(java.awt.event.ActionEvent evt) {
52 | btnRemoveActionPerformed(evt);
53 | }
54 | });
55 |
56 | btnBack.setBackground(new java.awt.Color(17, 122, 102));
57 | btnBack.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
58 | btnBack.setForeground(new java.awt.Color(255, 255, 255));
59 | btnBack.setText("GO BACK");
60 | btnBack.setBorder(null);
61 | btnBack.addActionListener(new java.awt.event.ActionListener() {
62 | public void actionPerformed(java.awt.event.ActionEvent evt) {
63 | btnBackActionPerformed(evt);
64 | }
65 | });
66 |
67 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 22)); // NOI18N
68 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
69 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
70 | jLabel1.setText("Delete Member");
71 |
72 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
73 | jPanel1.setLayout(jPanel1Layout);
74 | jPanel1Layout.setHorizontalGroup(
75 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
76 | .addGroup(jPanel1Layout.createSequentialGroup()
77 | .addContainerGap()
78 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
79 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
80 | .addGroup(jPanel1Layout.createSequentialGroup()
81 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
82 | .addGroup(jPanel1Layout.createSequentialGroup()
83 | .addGap(18, 18, 18)
84 | .addComponent(jLabel2)
85 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
86 | .addComponent(txtRegNo, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE))
87 | .addGroup(jPanel1Layout.createSequentialGroup()
88 | .addGap(60, 60, 60)
89 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
90 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
91 | .addComponent(btnRemove, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)))
92 | .addGap(0, 0, Short.MAX_VALUE))
93 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
94 | .addGap(0, 0, Short.MAX_VALUE)
95 | .addComponent(txtRemoveMember, javax.swing.GroupLayout.PREFERRED_SIZE, 396, javax.swing.GroupLayout.PREFERRED_SIZE)))
96 | .addContainerGap())
97 | );
98 | jPanel1Layout.setVerticalGroup(
99 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
100 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
101 | .addGap(21, 21, 21)
102 | .addComponent(jLabel1)
103 | .addGap(18, 18, 18)
104 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
105 | .addComponent(jLabel2)
106 | .addComponent(txtRegNo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
107 | .addGap(18, 18, 18)
108 | .addComponent(txtRemoveMember, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
109 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
110 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
111 | .addGroup(jPanel1Layout.createSequentialGroup()
112 | .addComponent(btnRemove, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
113 | .addGap(1, 1, 1))
114 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))
115 | .addGap(24, 24, 24))
116 | );
117 |
118 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
119 | getContentPane().setLayout(layout);
120 | layout.setHorizontalGroup(
121 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
122 | .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
123 | );
124 | layout.setVerticalGroup(
125 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
126 | .addGroup(layout.createSequentialGroup()
127 | .addContainerGap()
128 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
129 | .addContainerGap())
130 | );
131 |
132 | pack();
133 | }// //GEN-END:initComponents
134 |
135 | private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackActionPerformed
136 | dispose();
137 | JFrameMemberMenu memberMenu = new JFrameMemberMenu();
138 | memberMenu.setVisible(true);
139 | }//GEN-LAST:event_btnBackActionPerformed
140 |
141 | private void txtRegNoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtRegNoActionPerformed
142 |
143 | }//GEN-LAST:event_txtRegNoActionPerformed
144 |
145 | private void btnRemoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveActionPerformed
146 |
147 | String regId = txtRegNo.getText();
148 | if(!(regId.isEmpty())){
149 | if(gym.checkNumberIsInt(regId)){
150 | String memberData = gym.deleteMember(Integer.parseInt(regId));
151 | txtRemoveMember.setText(memberData);
152 | txtRemoveMember.setEditable(false);
153 | } else{
154 | JOptionPane.showMessageDialog(null, "Reg id should be in numbers, then search");
155 | txtRegNo.setText("");
156 | }
157 | } else{
158 | JOptionPane.showMessageDialog(null, "First enter the reg Id, then search");
159 | }
160 | }//GEN-LAST:event_btnRemoveActionPerformed
161 |
162 | public static void main(String args[]) {
163 | java.awt.EventQueue.invokeLater(new Runnable() {
164 | public void run() {
165 | new JFrameDeleteMember().setVisible(true);
166 | }
167 | });
168 | }
169 | // Variables declaration - do not modify//GEN-BEGIN:variables
170 | private javax.swing.JButton btnBack;
171 | private javax.swing.JButton btnRemove;
172 | private javax.swing.JLabel jLabel1;
173 | private javax.swing.JLabel jLabel2;
174 | private javax.swing.JPanel jPanel1;
175 | private javax.swing.JTextField txtRegNo;
176 | private javax.swing.JTextField txtRemoveMember;
177 | // End of variables declaration//GEN-END:variables
178 | }
179 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameDeleteTrainer.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
204 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameDeleteTrainer.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import javax.swing.*;
3 | public class JFrameDeleteTrainer extends javax.swing.JFrame {
4 | Gym gym = new Gym();
5 | public JFrameDeleteTrainer() {
6 | initComponents();
7 | txtRemoveTrainer.setEditable(false);
8 | }
9 | @SuppressWarnings("unchecked")
10 | // //GEN-BEGIN:initComponents
11 | private void initComponents() {
12 |
13 | jPanel1 = new javax.swing.JPanel();
14 | jLabel1 = new javax.swing.JLabel();
15 | btnRemove = new javax.swing.JButton();
16 | txtRegNo = new javax.swing.JTextField();
17 | jLabel2 = new javax.swing.JLabel();
18 | txtRemoveTrainer = new javax.swing.JTextField();
19 | btnBack = new javax.swing.JButton();
20 |
21 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
22 |
23 | jPanel1.setBackground(new java.awt.Color(35, 43, 42));
24 |
25 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 22)); // NOI18N
26 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
27 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
28 | jLabel1.setText("Remove Trainer");
29 |
30 | btnRemove.setBackground(new java.awt.Color(17, 122, 102));
31 | btnRemove.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
32 | btnRemove.setForeground(new java.awt.Color(255, 255, 255));
33 | btnRemove.setText("REMOVE");
34 | btnRemove.setBorder(null);
35 | btnRemove.addActionListener(new java.awt.event.ActionListener() {
36 | public void actionPerformed(java.awt.event.ActionEvent evt) {
37 | btnRemoveActionPerformed(evt);
38 | }
39 | });
40 |
41 | txtRegNo.setBackground(new java.awt.Color(35, 43, 42));
42 | txtRegNo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
43 | txtRegNo.setForeground(new java.awt.Color(255, 255, 255));
44 | txtRegNo.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 255, 255)));
45 | txtRegNo.addActionListener(new java.awt.event.ActionListener() {
46 | public void actionPerformed(java.awt.event.ActionEvent evt) {
47 | txtRegNoActionPerformed(evt);
48 | }
49 | });
50 |
51 | jLabel2.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
52 | jLabel2.setForeground(new java.awt.Color(255, 255, 255));
53 | jLabel2.setText("Registration Num : ");
54 |
55 | txtRemoveTrainer.setEditable(false);
56 | txtRemoveTrainer.setBackground(new java.awt.Color(35, 43, 42));
57 | txtRemoveTrainer.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N
58 | txtRemoveTrainer.setForeground(new java.awt.Color(255, 255, 255));
59 | txtRemoveTrainer.setHorizontalAlignment(javax.swing.JTextField.CENTER);
60 |
61 | btnBack.setBackground(new java.awt.Color(17, 122, 102));
62 | btnBack.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
63 | btnBack.setForeground(new java.awt.Color(255, 255, 255));
64 | btnBack.setText("GO BACK");
65 | btnBack.setBorder(null);
66 | btnBack.addActionListener(new java.awt.event.ActionListener() {
67 | public void actionPerformed(java.awt.event.ActionEvent evt) {
68 | btnBackActionPerformed(evt);
69 | }
70 | });
71 |
72 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
73 | jPanel1.setLayout(jPanel1Layout);
74 | jPanel1Layout.setHorizontalGroup(
75 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
76 | .addGroup(jPanel1Layout.createSequentialGroup()
77 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
78 | .addGroup(jPanel1Layout.createSequentialGroup()
79 | .addContainerGap()
80 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
81 | .addGroup(jPanel1Layout.createSequentialGroup()
82 | .addContainerGap()
83 | .addComponent(txtRemoveTrainer)))
84 | .addContainerGap())
85 | .addGroup(jPanel1Layout.createSequentialGroup()
86 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
87 | .addGroup(jPanel1Layout.createSequentialGroup()
88 | .addGap(20, 20, 20)
89 | .addComponent(jLabel2)
90 | .addGap(18, 18, 18)
91 | .addComponent(txtRegNo, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE))
92 | .addGroup(jPanel1Layout.createSequentialGroup()
93 | .addGap(79, 79, 79)
94 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
95 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
96 | .addComponent(btnRemove, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)))
97 | .addGap(0, 50, Short.MAX_VALUE))
98 | );
99 | jPanel1Layout.setVerticalGroup(
100 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
101 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
102 | .addGap(15, 15, 15)
103 | .addComponent(jLabel1)
104 | .addGap(18, 18, 18)
105 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
106 | .addComponent(txtRegNo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
107 | .addComponent(jLabel2))
108 | .addGap(18, 18, 18)
109 | .addComponent(txtRemoveTrainer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
110 | .addGap(18, 18, 18)
111 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
112 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
113 | .addComponent(btnRemove, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
114 | .addGap(14, 14, 14))
115 | );
116 |
117 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
118 | getContentPane().setLayout(layout);
119 | layout.setHorizontalGroup(
120 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
121 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
122 | );
123 | layout.setVerticalGroup(
124 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
125 | .addGroup(layout.createSequentialGroup()
126 | .addContainerGap()
127 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
128 | );
129 |
130 | pack();
131 | }// //GEN-END:initComponents
132 |
133 | private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackActionPerformed
134 | dispose();
135 | JFrameTrainerMenu trainerMenu = new JFrameTrainerMenu();
136 | trainerMenu.setVisible(true);
137 | }//GEN-LAST:event_btnBackActionPerformed
138 |
139 | private void txtRegNoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtRegNoActionPerformed
140 |
141 | }//GEN-LAST:event_txtRegNoActionPerformed
142 |
143 | private void btnRemoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveActionPerformed
144 | String regId = txtRegNo.getText();
145 | if(!(regId.isEmpty())){
146 | if(gym.checkNumberIsInt(regId)){
147 | String trainerData = gym.deleteTrainer(Integer.parseInt(regId));
148 | txtRemoveTrainer.setText(trainerData);
149 | txtRemoveTrainer.setEditable(false);
150 | } else{
151 | JOptionPane.showMessageDialog(null, "Reg id should be in numbers, then search");
152 | }
153 | } else{
154 | JOptionPane.showMessageDialog(null, "First enter the reg Id, then search");
155 | }
156 | }//GEN-LAST:event_btnRemoveActionPerformed
157 |
158 | public static void main(String args[]) {
159 | java.awt.EventQueue.invokeLater(new Runnable() {
160 | public void run() {
161 | new JFrameDeleteTrainer().setVisible(true);
162 | }
163 | });
164 | }
165 | // Variables declaration - do not modify//GEN-BEGIN:variables
166 | private javax.swing.JButton btnBack;
167 | private javax.swing.JButton btnRemove;
168 | private javax.swing.JLabel jLabel1;
169 | private javax.swing.JLabel jLabel2;
170 | private javax.swing.JPanel jPanel1;
171 | private javax.swing.JTextField txtRegNo;
172 | private javax.swing.JTextField txtRemoveTrainer;
173 | // End of variables declaration//GEN-END:variables
174 | }
175 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameSearchMachine.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import javax.swing.*;
3 | public class JFrameSearchMachine extends javax.swing.JFrame {
4 | Gym gym = new Gym();
5 | public JFrameSearchMachine() {
6 | initComponents();
7 | txtViewMachine.setEditable(false);
8 | }
9 | @SuppressWarnings("unchecked")
10 | // //GEN-BEGIN:initComponents
11 | private void initComponents() {
12 |
13 | jPanel1 = new javax.swing.JPanel();
14 | btnBack = new javax.swing.JButton();
15 | jScrollPane1 = new javax.swing.JScrollPane();
16 | txtViewMachine = new javax.swing.JTextArea();
17 | jLabel2 = new javax.swing.JLabel();
18 | txtRegNo = new javax.swing.JTextField();
19 | btnSeacrh = new javax.swing.JButton();
20 | jLabel1 = new javax.swing.JLabel();
21 |
22 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
23 |
24 | jPanel1.setBackground(new java.awt.Color(35, 43, 42));
25 |
26 | btnBack.setBackground(new java.awt.Color(17, 122, 102));
27 | btnBack.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
28 | btnBack.setForeground(new java.awt.Color(255, 255, 255));
29 | btnBack.setText("GO BACK");
30 | btnBack.setBorder(null);
31 | btnBack.addActionListener(new java.awt.event.ActionListener() {
32 | public void actionPerformed(java.awt.event.ActionEvent evt) {
33 | btnBackActionPerformed(evt);
34 | }
35 | });
36 |
37 | txtViewMachine.setBackground(new java.awt.Color(35, 43, 42));
38 | txtViewMachine.setColumns(20);
39 | txtViewMachine.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
40 | txtViewMachine.setForeground(new java.awt.Color(255, 255, 255));
41 | txtViewMachine.setRows(5);
42 | jScrollPane1.setViewportView(txtViewMachine);
43 |
44 | jLabel2.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
45 | jLabel2.setForeground(new java.awt.Color(255, 255, 255));
46 | jLabel2.setText("Registration Num : ");
47 |
48 | txtRegNo.setBackground(new java.awt.Color(35, 43, 42));
49 | txtRegNo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
50 | txtRegNo.setForeground(new java.awt.Color(255, 255, 255));
51 | txtRegNo.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 255, 255)));
52 | txtRegNo.addActionListener(new java.awt.event.ActionListener() {
53 | public void actionPerformed(java.awt.event.ActionEvent evt) {
54 | txtRegNoActionPerformed(evt);
55 | }
56 | });
57 |
58 | btnSeacrh.setBackground(new java.awt.Color(17, 122, 102));
59 | btnSeacrh.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
60 | btnSeacrh.setForeground(new java.awt.Color(255, 255, 255));
61 | btnSeacrh.setText("SEARCH");
62 | btnSeacrh.setBorder(null);
63 | btnSeacrh.addActionListener(new java.awt.event.ActionListener() {
64 | public void actionPerformed(java.awt.event.ActionEvent evt) {
65 | btnSeacrhActionPerformed(evt);
66 | }
67 | });
68 |
69 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 22)); // NOI18N
70 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
71 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
72 | jLabel1.setText("Search Machine Information");
73 |
74 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
75 | jPanel1.setLayout(jPanel1Layout);
76 | jPanel1Layout.setHorizontalGroup(
77 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
78 | .addGroup(jPanel1Layout.createSequentialGroup()
79 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
80 | .addGroup(jPanel1Layout.createSequentialGroup()
81 | .addGap(23, 23, 23)
82 | .addComponent(jLabel2)
83 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
84 | .addComponent(txtRegNo, javax.swing.GroupLayout.PREFERRED_SIZE, 195, javax.swing.GroupLayout.PREFERRED_SIZE)
85 | .addGap(0, 0, Short.MAX_VALUE))
86 | .addGroup(jPanel1Layout.createSequentialGroup()
87 | .addContainerGap()
88 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
89 | .addGroup(jPanel1Layout.createSequentialGroup()
90 | .addGap(8, 8, 8)
91 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 390, javax.swing.GroupLayout.PREFERRED_SIZE)
92 | .addGap(0, 12, Short.MAX_VALUE))
93 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
94 | .addContainerGap())
95 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
96 | .addGap(0, 0, Short.MAX_VALUE)
97 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
98 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
99 | .addComponent(btnSeacrh, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)
100 | .addGap(58, 58, 58))
101 | );
102 | jPanel1Layout.setVerticalGroup(
103 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
104 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
105 | .addGap(15, 15, 15)
106 | .addComponent(jLabel1)
107 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)
108 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
109 | .addComponent(jLabel2)
110 | .addComponent(txtRegNo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
111 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
112 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
113 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
114 | .addComponent(btnSeacrh, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))
115 | .addGap(12, 12, 12)
116 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 316, javax.swing.GroupLayout.PREFERRED_SIZE)
117 | .addGap(15, 15, 15))
118 | );
119 |
120 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
121 | getContentPane().setLayout(layout);
122 | layout.setHorizontalGroup(
123 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
124 | .addGroup(layout.createSequentialGroup()
125 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
126 | .addGap(0, 6, Short.MAX_VALUE))
127 | );
128 | layout.setVerticalGroup(
129 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
130 | .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
131 | );
132 |
133 | pack();
134 | }// //GEN-END:initComponents
135 |
136 | private void txtRegNoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtRegNoActionPerformed
137 |
138 | }//GEN-LAST:event_txtRegNoActionPerformed
139 |
140 | private void btnSeacrhActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSeacrhActionPerformed
141 | String regId = txtRegNo.getText();
142 | if(!(regId.isEmpty())){
143 | if(gym.checkNumberIsInt(regId)){
144 | String machineData = gym.searchMachine(Integer.parseInt(regId));
145 | txtViewMachine.setText(machineData);
146 | txtViewMachine.setEditable(false);
147 | } else{
148 | JOptionPane.showMessageDialog(null, "Reg id should be in numbers, then search");
149 | }
150 | } else{
151 | JOptionPane.showMessageDialog(null, "First enter the reg Id, then search");
152 | }
153 | }//GEN-LAST:event_btnSeacrhActionPerformed
154 |
155 | private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackActionPerformed
156 | dispose();
157 | JFrameMachineMenu machineMenu = new JFrameMachineMenu();
158 | machineMenu.setVisible(true);
159 | }//GEN-LAST:event_btnBackActionPerformed
160 |
161 | public static void main(String args[]) {
162 | java.awt.EventQueue.invokeLater(new Runnable() {
163 | public void run() {
164 | new JFrameSearchMachine().setVisible(true);
165 | }
166 | });
167 | }
168 | // Variables declaration - do not modify//GEN-BEGIN:variables
169 | private javax.swing.JButton btnBack;
170 | private javax.swing.JButton btnSeacrh;
171 | private javax.swing.JLabel jLabel1;
172 | private javax.swing.JLabel jLabel2;
173 | private javax.swing.JPanel jPanel1;
174 | private javax.swing.JScrollPane jScrollPane1;
175 | private javax.swing.JTextField txtRegNo;
176 | private javax.swing.JTextArea txtViewMachine;
177 | // End of variables declaration//GEN-END:variables
178 | }
179 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameSearchMember.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import javax.swing.*;
3 | public class JFrameSearchMember extends javax.swing.JFrame {
4 |
5 | Gym gym = new Gym();
6 | public JFrameSearchMember() {
7 | initComponents();
8 | txtViewMember.setEditable(false);
9 | }
10 | @SuppressWarnings("unchecked")
11 | // //GEN-BEGIN:initComponents
12 | private void initComponents() {
13 |
14 | jPanel1 = new javax.swing.JPanel();
15 | jScrollPane1 = new javax.swing.JScrollPane();
16 | txtViewMember = new javax.swing.JTextArea();
17 | jLabel2 = new javax.swing.JLabel();
18 | txtRegNo = new javax.swing.JTextField();
19 | btnSeacrh = new javax.swing.JButton();
20 | jLabel1 = new javax.swing.JLabel();
21 | btnBack = new javax.swing.JButton();
22 |
23 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
24 |
25 | jPanel1.setBackground(new java.awt.Color(35, 43, 42));
26 |
27 | txtViewMember.setBackground(new java.awt.Color(35, 43, 42));
28 | txtViewMember.setColumns(20);
29 | txtViewMember.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N
30 | txtViewMember.setForeground(new java.awt.Color(255, 255, 255));
31 | txtViewMember.setRows(5);
32 | jScrollPane1.setViewportView(txtViewMember);
33 |
34 | jLabel2.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
35 | jLabel2.setForeground(new java.awt.Color(255, 255, 255));
36 | jLabel2.setText("Registration Num : ");
37 |
38 | txtRegNo.setBackground(new java.awt.Color(35, 43, 42));
39 | txtRegNo.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
40 | txtRegNo.setForeground(new java.awt.Color(255, 255, 255));
41 | txtRegNo.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 255, 255)));
42 | txtRegNo.addActionListener(new java.awt.event.ActionListener() {
43 | public void actionPerformed(java.awt.event.ActionEvent evt) {
44 | txtRegNoActionPerformed(evt);
45 | }
46 | });
47 |
48 | btnSeacrh.setBackground(new java.awt.Color(17, 122, 102));
49 | btnSeacrh.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
50 | btnSeacrh.setForeground(new java.awt.Color(255, 255, 255));
51 | btnSeacrh.setText("SEARCH");
52 | btnSeacrh.setBorder(null);
53 | btnSeacrh.addActionListener(new java.awt.event.ActionListener() {
54 | public void actionPerformed(java.awt.event.ActionEvent evt) {
55 | btnSeacrhActionPerformed(evt);
56 | }
57 | });
58 |
59 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 22)); // NOI18N
60 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
61 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
62 | jLabel1.setText("View Member Information");
63 |
64 | btnBack.setBackground(new java.awt.Color(17, 122, 102));
65 | btnBack.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
66 | btnBack.setForeground(new java.awt.Color(255, 255, 255));
67 | btnBack.setText("GO BACK");
68 | btnBack.setBorder(null);
69 | btnBack.setPreferredSize(new java.awt.Dimension(85, 23));
70 | btnBack.addActionListener(new java.awt.event.ActionListener() {
71 | public void actionPerformed(java.awt.event.ActionEvent evt) {
72 | btnBackActionPerformed(evt);
73 | }
74 | });
75 |
76 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
77 | jPanel1.setLayout(jPanel1Layout);
78 | jPanel1Layout.setHorizontalGroup(
79 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
80 | .addGroup(jPanel1Layout.createSequentialGroup()
81 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
82 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
83 | .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
84 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
85 | .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
86 | .addGap(18, 18, 18)
87 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
88 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 381, javax.swing.GroupLayout.PREFERRED_SIZE)
89 | .addGroup(jPanel1Layout.createSequentialGroup()
90 | .addComponent(jLabel2)
91 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
92 | .addComponent(txtRegNo, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE))))
93 | .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
94 | .addGap(54, 54, 54)
95 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
96 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
97 | .addComponent(btnSeacrh, javax.swing.GroupLayout.PREFERRED_SIZE, 202, javax.swing.GroupLayout.PREFERRED_SIZE)))
98 | .addGap(0, 10, Short.MAX_VALUE)))
99 | .addContainerGap())
100 | );
101 | jPanel1Layout.setVerticalGroup(
102 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
103 | .addGroup(jPanel1Layout.createSequentialGroup()
104 | .addGap(21, 21, 21)
105 | .addComponent(jLabel1)
106 | .addGap(18, 18, 18)
107 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
108 | .addComponent(jLabel2)
109 | .addComponent(txtRegNo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
110 | .addGap(18, 18, 18)
111 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
112 | .addComponent(btnSeacrh, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
113 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))
114 | .addGap(18, 18, 18)
115 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 282, javax.swing.GroupLayout.PREFERRED_SIZE)
116 | .addContainerGap(17, Short.MAX_VALUE))
117 | );
118 |
119 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
120 | getContentPane().setLayout(layout);
121 | layout.setHorizontalGroup(
122 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
123 | .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
124 | );
125 | layout.setVerticalGroup(
126 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
127 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
128 | );
129 |
130 | pack();
131 | }// //GEN-END:initComponents
132 |
133 | private void txtRegNoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtRegNoActionPerformed
134 |
135 | }//GEN-LAST:event_txtRegNoActionPerformed
136 |
137 | private void btnSeacrhActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSeacrhActionPerformed
138 |
139 | String regId = txtRegNo.getText();
140 | if(!(regId.isEmpty())){
141 | if(gym.checkNumberIsInt(regId)){
142 | String memberData = gym.searchMember(Integer.parseInt(regId));
143 | txtViewMember.setText(memberData);
144 | txtViewMember.setEditable(false);
145 | } else{
146 | JOptionPane.showMessageDialog(null, "Reg id should be in numbers, then search");
147 | }
148 | } else{
149 | JOptionPane.showMessageDialog(null, "First enter the reg Id, then search");
150 | }
151 |
152 | }//GEN-LAST:event_btnSeacrhActionPerformed
153 |
154 | private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackActionPerformed
155 | dispose();
156 | JFrameMemberMenu memberMenu = new JFrameMemberMenu();
157 | memberMenu.setVisible(true);
158 | }//GEN-LAST:event_btnBackActionPerformed
159 |
160 | public static void main(String args[]) {
161 | java.awt.EventQueue.invokeLater(new Runnable() {
162 | public void run() {
163 | new JFrameSearchMember().setVisible(true);
164 | }
165 | });
166 | }
167 |
168 | // Variables declaration - do not modify//GEN-BEGIN:variables
169 | private javax.swing.JButton btnBack;
170 | private javax.swing.JButton btnSeacrh;
171 | private javax.swing.JLabel jLabel1;
172 | private javax.swing.JLabel jLabel2;
173 | private javax.swing.JPanel jPanel1;
174 | private javax.swing.JScrollPane jScrollPane1;
175 | private javax.swing.JTextField txtRegNo;
176 | private javax.swing.JTextArea txtViewMember;
177 | // End of variables declaration//GEN-END:variables
178 | }
179 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameSearchTrainer.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import javax.swing.JOptionPane;
3 |
4 |
5 | public class JFrameSearchTrainer extends javax.swing.JFrame {
6 |
7 | Gym gym = new Gym();
8 | public JFrameSearchTrainer() {
9 | initComponents();
10 | txtViewTrainer.setEditable(false);
11 | }
12 | @SuppressWarnings("unchecked")
13 | // //GEN-BEGIN:initComponents
14 | private void initComponents() {
15 |
16 | jPanel1 = new javax.swing.JPanel();
17 | jLabel2 = new javax.swing.JLabel();
18 | txtRegNo = new javax.swing.JTextField();
19 | btnSeacrh = new javax.swing.JButton();
20 | jLabel1 = new javax.swing.JLabel();
21 | jScrollPane1 = new javax.swing.JScrollPane();
22 | txtViewTrainer = new javax.swing.JTextArea();
23 | btnBack = new javax.swing.JButton();
24 |
25 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
26 |
27 | jPanel1.setBackground(new java.awt.Color(35, 43, 42));
28 |
29 | jLabel2.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
30 | jLabel2.setForeground(new java.awt.Color(255, 255, 255));
31 | jLabel2.setText("Registration Num : ");
32 |
33 | txtRegNo.setBackground(new java.awt.Color(35, 43, 42));
34 | txtRegNo.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
35 | txtRegNo.setForeground(new java.awt.Color(255, 255, 255));
36 | txtRegNo.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 255, 255)));
37 | txtRegNo.addActionListener(new java.awt.event.ActionListener() {
38 | public void actionPerformed(java.awt.event.ActionEvent evt) {
39 | txtRegNoActionPerformed(evt);
40 | }
41 | });
42 |
43 | btnSeacrh.setBackground(new java.awt.Color(17, 122, 102));
44 | btnSeacrh.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
45 | btnSeacrh.setForeground(new java.awt.Color(255, 255, 255));
46 | btnSeacrh.setText("SEARCH");
47 | btnSeacrh.setBorder(null);
48 | btnSeacrh.addActionListener(new java.awt.event.ActionListener() {
49 | public void actionPerformed(java.awt.event.ActionEvent evt) {
50 | btnSeacrhActionPerformed(evt);
51 | }
52 | });
53 |
54 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 22)); // NOI18N
55 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
56 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
57 | jLabel1.setText("View Trainer Information");
58 |
59 | txtViewTrainer.setBackground(new java.awt.Color(35, 43, 42));
60 | txtViewTrainer.setColumns(20);
61 | txtViewTrainer.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
62 | txtViewTrainer.setForeground(new java.awt.Color(255, 255, 255));
63 | txtViewTrainer.setLineWrap(true);
64 | txtViewTrainer.setRows(5);
65 | txtViewTrainer.setBorder(null);
66 | jScrollPane1.setViewportView(txtViewTrainer);
67 |
68 | btnBack.setBackground(new java.awt.Color(17, 122, 102));
69 | btnBack.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
70 | btnBack.setForeground(new java.awt.Color(255, 255, 255));
71 | btnBack.setText("GO BACK");
72 | btnBack.setBorder(null);
73 | btnBack.addActionListener(new java.awt.event.ActionListener() {
74 | public void actionPerformed(java.awt.event.ActionEvent evt) {
75 | btnBackActionPerformed(evt);
76 | }
77 | });
78 |
79 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
80 | jPanel1.setLayout(jPanel1Layout);
81 | jPanel1Layout.setHorizontalGroup(
82 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
83 | .addGroup(jPanel1Layout.createSequentialGroup()
84 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
85 | .addGroup(jPanel1Layout.createSequentialGroup()
86 | .addGap(12, 12, 12)
87 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
88 | .addGroup(jPanel1Layout.createSequentialGroup()
89 | .addComponent(jLabel2)
90 | .addGap(18, 18, 18)
91 | .addComponent(txtRegNo, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE))
92 | .addGroup(jPanel1Layout.createSequentialGroup()
93 | .addGap(43, 43, 43)
94 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
95 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
96 | .addComponent(btnSeacrh, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE))))
97 | .addGroup(jPanel1Layout.createSequentialGroup()
98 | .addGap(50, 50, 50)
99 | .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 312, javax.swing.GroupLayout.PREFERRED_SIZE)))
100 | .addGap(0, 47, Short.MAX_VALUE))
101 | .addGroup(jPanel1Layout.createSequentialGroup()
102 | .addGap(22, 22, 22)
103 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 365, javax.swing.GroupLayout.PREFERRED_SIZE)
104 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
105 | );
106 | jPanel1Layout.setVerticalGroup(
107 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
108 | .addGroup(jPanel1Layout.createSequentialGroup()
109 | .addGap(23, 23, 23)
110 | .addComponent(jLabel1)
111 | .addGap(18, 18, 18)
112 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
113 | .addComponent(jLabel2)
114 | .addComponent(txtRegNo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
115 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
116 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
117 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
118 | .addComponent(btnSeacrh, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))
119 | .addGap(18, 18, 18)
120 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 274, javax.swing.GroupLayout.PREFERRED_SIZE)
121 | .addContainerGap(18, Short.MAX_VALUE))
122 | );
123 |
124 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
125 | getContentPane().setLayout(layout);
126 | layout.setHorizontalGroup(
127 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
128 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
129 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
130 | .addContainerGap())
131 | );
132 | layout.setVerticalGroup(
133 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
134 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
135 | );
136 |
137 | pack();
138 | }// //GEN-END:initComponents
139 |
140 | private void txtRegNoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtRegNoActionPerformed
141 |
142 | }//GEN-LAST:event_txtRegNoActionPerformed
143 |
144 | private void btnSeacrhActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSeacrhActionPerformed
145 |
146 | String regId = txtRegNo.getText();
147 | if(!(regId.isEmpty())){
148 | if(gym.checkNumberIsInt(regId)){
149 | String trainerData = gym.searchTrainer(Integer.parseInt(regId));
150 | txtViewTrainer.setText(trainerData);
151 | txtViewTrainer.setEditable(false);
152 | } else{
153 | JOptionPane.showMessageDialog(null, "Reg id should be in numbers, then search");
154 | }
155 | } else{
156 | JOptionPane.showMessageDialog(null, "First enter the reg Id, then search");
157 | }
158 | }//GEN-LAST:event_btnSeacrhActionPerformed
159 |
160 | private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackActionPerformed
161 | dispose();
162 | JFrameTrainerMenu trainerMenu = new JFrameTrainerMenu();
163 | trainerMenu.setVisible(true);
164 | }//GEN-LAST:event_btnBackActionPerformed
165 |
166 | public static void main(String args[]) {
167 | java.awt.EventQueue.invokeLater(new Runnable() {
168 | public void run() {
169 | new JFrameSearchTrainer().setVisible(true);
170 | }
171 | });
172 | }
173 | // Variables declaration - do not modify//GEN-BEGIN:variables
174 | private javax.swing.JButton btnBack;
175 | private javax.swing.JButton btnSeacrh;
176 | private javax.swing.JLabel jLabel1;
177 | private javax.swing.JLabel jLabel2;
178 | private javax.swing.JPanel jPanel1;
179 | private javax.swing.JScrollPane jScrollPane1;
180 | private javax.swing.JTextField txtRegNo;
181 | private javax.swing.JTextArea txtViewTrainer;
182 | // End of variables declaration//GEN-END:variables
183 | }
184 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameViewAllBookings.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
138 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameViewAllBookings.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | public class JFrameViewAllBookings extends javax.swing.JFrame {
3 | Gym gym = new Gym();
4 | public JFrameViewAllBookings() {
5 | initComponents();
6 | txtViewAllBookings.setEditable(false);
7 | String allBooking = gym.viewAllMachineBookings();
8 | txtViewAllBookings.setText(allBooking);
9 | txtViewAllBookings.setEditable(false);
10 | }
11 | @SuppressWarnings("unchecked")
12 | // //GEN-BEGIN:initComponents
13 | private void initComponents() {
14 |
15 | jPanel1 = new javax.swing.JPanel();
16 | jScrollPane1 = new javax.swing.JScrollPane();
17 | txtViewAllBookings = new javax.swing.JTextArea();
18 | btnBack = new javax.swing.JButton();
19 | jLabel1 = new javax.swing.JLabel();
20 |
21 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
22 |
23 | jPanel1.setBackground(new java.awt.Color(35, 43, 42));
24 |
25 | txtViewAllBookings.setBackground(new java.awt.Color(35, 43, 42));
26 | txtViewAllBookings.setColumns(20);
27 | txtViewAllBookings.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
28 | txtViewAllBookings.setForeground(new java.awt.Color(255, 255, 255));
29 | txtViewAllBookings.setRows(5);
30 | jScrollPane1.setViewportView(txtViewAllBookings);
31 |
32 | btnBack.setBackground(new java.awt.Color(17, 122, 102));
33 | btnBack.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
34 | btnBack.setForeground(new java.awt.Color(255, 255, 255));
35 | btnBack.setText("Back");
36 | btnBack.addActionListener(new java.awt.event.ActionListener() {
37 | public void actionPerformed(java.awt.event.ActionEvent evt) {
38 | btnBackActionPerformed(evt);
39 | }
40 | });
41 |
42 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 22)); // NOI18N
43 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
44 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
45 | jLabel1.setText("View all bookings ");
46 |
47 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
48 | jPanel1.setLayout(jPanel1Layout);
49 | jPanel1Layout.setHorizontalGroup(
50 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
51 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
52 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
53 | .addContainerGap(19, Short.MAX_VALUE)
54 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
55 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
56 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 337, javax.swing.GroupLayout.PREFERRED_SIZE)
57 | .addGap(16, 16, 16))
58 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
59 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
60 | .addGap(135, 135, 135))))
61 | );
62 | jPanel1Layout.setVerticalGroup(
63 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
64 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
65 | .addContainerGap(20, Short.MAX_VALUE)
66 | .addComponent(jLabel1)
67 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
68 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 391, javax.swing.GroupLayout.PREFERRED_SIZE)
69 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
70 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
71 | .addGap(12, 12, 12))
72 | );
73 |
74 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
75 | getContentPane().setLayout(layout);
76 | layout.setHorizontalGroup(
77 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
78 | .addGroup(layout.createSequentialGroup()
79 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
80 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
81 | .addContainerGap())
82 | );
83 | layout.setVerticalGroup(
84 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
85 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
86 | );
87 |
88 | pack();
89 | }// //GEN-END:initComponents
90 |
91 | private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackActionPerformed
92 | dispose();
93 | JFrameBookingMenu bookingMenu = new JFrameBookingMenu();
94 | bookingMenu.setVisible(true);
95 | }//GEN-LAST:event_btnBackActionPerformed
96 |
97 | public static void main(String args[]) {
98 | java.awt.EventQueue.invokeLater(new Runnable() {
99 | public void run() {
100 | new JFrameViewAllBookings().setVisible(true);
101 | }
102 | });
103 | }
104 |
105 | // Variables declaration - do not modify//GEN-BEGIN:variables
106 | private javax.swing.JButton btnBack;
107 | private javax.swing.JLabel jLabel1;
108 | private javax.swing.JPanel jPanel1;
109 | private javax.swing.JScrollPane jScrollPane1;
110 | private javax.swing.JTextArea txtViewAllBookings;
111 | // End of variables declaration//GEN-END:variables
112 | }
113 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameViewAllMachines.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
140 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameViewAllMachines.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | public class JFrameViewAllMachines extends javax.swing.JFrame {
3 | Gym gym = new Gym();
4 | public JFrameViewAllMachines() {
5 | initComponents();
6 | txtViewAllMachines.setEditable(false);
7 | String allmachine = gym.viewAllMachines();
8 | txtViewAllMachines.setText(allmachine);
9 | txtViewAllMachines.setEditable(false);
10 | }
11 | @SuppressWarnings("unchecked")
12 | // //GEN-BEGIN:initComponents
13 | private void initComponents() {
14 |
15 | jPanel1 = new javax.swing.JPanel();
16 | jScrollPane1 = new javax.swing.JScrollPane();
17 | txtViewAllMachines = new javax.swing.JTextArea();
18 | jLabel1 = new javax.swing.JLabel();
19 | btnBack = new javax.swing.JButton();
20 |
21 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
22 |
23 | jPanel1.setBackground(new java.awt.Color(35, 43, 42));
24 |
25 | txtViewAllMachines.setBackground(new java.awt.Color(35, 43, 42));
26 | txtViewAllMachines.setColumns(20);
27 | txtViewAllMachines.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
28 | txtViewAllMachines.setForeground(new java.awt.Color(255, 255, 255));
29 | txtViewAllMachines.setRows(5);
30 | jScrollPane1.setViewportView(txtViewAllMachines);
31 |
32 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 22)); // NOI18N
33 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
34 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
35 | jLabel1.setText("View All Machines");
36 |
37 | btnBack.setBackground(new java.awt.Color(17, 122, 102));
38 | btnBack.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
39 | btnBack.setForeground(new java.awt.Color(255, 255, 255));
40 | btnBack.setText("Go Back");
41 | btnBack.setBorder(null);
42 | btnBack.addActionListener(new java.awt.event.ActionListener() {
43 | public void actionPerformed(java.awt.event.ActionEvent evt) {
44 | btnBackActionPerformed(evt);
45 | }
46 | });
47 |
48 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
49 | jPanel1.setLayout(jPanel1Layout);
50 | jPanel1Layout.setHorizontalGroup(
51 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
52 | .addGroup(jPanel1Layout.createSequentialGroup()
53 | .addContainerGap()
54 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
55 | .addGroup(jPanel1Layout.createSequentialGroup()
56 | .addGap(6, 6, 6)
57 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 346, javax.swing.GroupLayout.PREFERRED_SIZE)
58 | .addGap(0, 8, Short.MAX_VALUE))
59 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
60 | .addContainerGap())
61 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
62 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
63 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
64 | .addGap(130, 130, 130))
65 | );
66 | jPanel1Layout.setVerticalGroup(
67 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
68 | .addGroup(jPanel1Layout.createSequentialGroup()
69 | .addGap(18, 18, 18)
70 | .addComponent(jLabel1)
71 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
72 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 376, javax.swing.GroupLayout.PREFERRED_SIZE)
73 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
74 | .addComponent(btnBack, javax.swing.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE)
75 | .addContainerGap())
76 | );
77 |
78 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
79 | getContentPane().setLayout(layout);
80 | layout.setHorizontalGroup(
81 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
82 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
83 | );
84 | layout.setVerticalGroup(
85 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
86 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
87 | );
88 |
89 | pack();
90 | }// //GEN-END:initComponents
91 |
92 | private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackActionPerformed
93 | dispose();
94 | JFrameMachineMenu machineMenu = new JFrameMachineMenu();
95 | machineMenu.setVisible(true);
96 | }//GEN-LAST:event_btnBackActionPerformed
97 |
98 | public static void main(String args[]) {
99 | java.awt.EventQueue.invokeLater(new Runnable() {
100 | public void run() {
101 | new JFrameViewAllMachines().setVisible(true);
102 | }
103 | });
104 | }
105 | // Variables declaration - do not modify//GEN-BEGIN:variables
106 | private javax.swing.JButton btnBack;
107 | private javax.swing.JLabel jLabel1;
108 | private javax.swing.JPanel jPanel1;
109 | private javax.swing.JScrollPane jScrollPane1;
110 | private javax.swing.JTextArea txtViewAllMachines;
111 | // End of variables declaration//GEN-END:variables
112 | }
113 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameViewAllMembers.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
148 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameViewAllMembers.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | public class JFrameViewAllMembers extends javax.swing.JFrame {
3 |
4 | Gym gym = new Gym();
5 | public JFrameViewAllMembers() {
6 | initComponents();
7 | txtViewAllMembers.setEditable(false);
8 | String allMembers = gym.viewAllMembers();
9 | txtViewAllMembers.setText(allMembers);
10 | txtViewAllMembers.setEditable(false);
11 | }
12 | @SuppressWarnings("unchecked")
13 | // //GEN-BEGIN:initComponents
14 | private void initComponents() {
15 |
16 | jPanel1 = new javax.swing.JPanel();
17 | jScrollPane1 = new javax.swing.JScrollPane();
18 | txtViewAllMembers = new javax.swing.JTextArea();
19 | btnBack = new javax.swing.JButton();
20 | jLabel1 = new javax.swing.JLabel();
21 |
22 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
23 |
24 | jPanel1.setBackground(new java.awt.Color(35, 43, 42));
25 |
26 | txtViewAllMembers.setBackground(new java.awt.Color(35, 43, 42));
27 | txtViewAllMembers.setColumns(20);
28 | txtViewAllMembers.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N
29 | txtViewAllMembers.setForeground(new java.awt.Color(255, 255, 255));
30 | txtViewAllMembers.setRows(5);
31 | txtViewAllMembers.setBorder(null);
32 | jScrollPane1.setViewportView(txtViewAllMembers);
33 |
34 | btnBack.setBackground(new java.awt.Color(17, 122, 102));
35 | btnBack.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
36 | btnBack.setForeground(new java.awt.Color(255, 255, 255));
37 | btnBack.setText("GO BACK");
38 | btnBack.setBorder(null);
39 | btnBack.addActionListener(new java.awt.event.ActionListener() {
40 | public void actionPerformed(java.awt.event.ActionEvent evt) {
41 | btnBackActionPerformed(evt);
42 | }
43 | });
44 |
45 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 22)); // NOI18N
46 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
47 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
48 | jLabel1.setText("View All Members ");
49 |
50 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
51 | jPanel1.setLayout(jPanel1Layout);
52 | jPanel1Layout.setHorizontalGroup(
53 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
54 | .addGroup(jPanel1Layout.createSequentialGroup()
55 | .addGap(117, 117, 117)
56 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)
57 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
58 | .addGroup(jPanel1Layout.createSequentialGroup()
59 | .addContainerGap()
60 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
61 | .addGroup(jPanel1Layout.createSequentialGroup()
62 | .addGap(24, 24, 24)
63 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 316, javax.swing.GroupLayout.PREFERRED_SIZE)
64 | .addContainerGap(32, Short.MAX_VALUE))
65 | .addGroup(jPanel1Layout.createSequentialGroup()
66 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
67 | .addContainerGap())))
68 | );
69 | jPanel1Layout.setVerticalGroup(
70 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
71 | .addGroup(jPanel1Layout.createSequentialGroup()
72 | .addGap(18, 18, 18)
73 | .addComponent(jLabel1)
74 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
75 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 370, javax.swing.GroupLayout.PREFERRED_SIZE)
76 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
77 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
78 | .addContainerGap(15, Short.MAX_VALUE))
79 | );
80 |
81 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
82 | getContentPane().setLayout(layout);
83 | layout.setHorizontalGroup(
84 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
85 | .addGroup(layout.createSequentialGroup()
86 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
87 | .addContainerGap())
88 | );
89 | layout.setVerticalGroup(
90 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
91 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
92 | );
93 |
94 | pack();
95 | }// //GEN-END:initComponents
96 |
97 | private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackActionPerformed
98 | dispose();
99 | JFrameMemberMenu memberMenu = new JFrameMemberMenu();
100 | memberMenu.setVisible(true);
101 | }//GEN-LAST:event_btnBackActionPerformed
102 |
103 | public static void main(String args[]) {
104 | java.awt.EventQueue.invokeLater(new Runnable() {
105 | public void run() {
106 | new JFrameViewAllMembers().setVisible(true);
107 | }
108 | });
109 | }
110 | // Variables declaration - do not modify//GEN-BEGIN:variables
111 | private javax.swing.JButton btnBack;
112 | private javax.swing.JLabel jLabel1;
113 | private javax.swing.JPanel jPanel1;
114 | private javax.swing.JScrollPane jScrollPane1;
115 | private javax.swing.JTextArea txtViewAllMembers;
116 | // End of variables declaration//GEN-END:variables
117 | }
118 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameViewAllTrainers.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
139 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/JFrameViewAllTrainers.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | public class JFrameViewAllTrainers extends javax.swing.JFrame {
3 | Gym gym = new Gym();
4 | public JFrameViewAllTrainers() {
5 | initComponents();
6 | txtViewAllTrainer.setEditable(false);
7 | String allTrainer = gym.viewAllTrainers();
8 | txtViewAllTrainer.setText(allTrainer);
9 | }
10 | @SuppressWarnings("unchecked")
11 | // //GEN-BEGIN:initComponents
12 | private void initComponents() {
13 |
14 | jPanel1 = new javax.swing.JPanel();
15 | jScrollPane1 = new javax.swing.JScrollPane();
16 | txtViewAllTrainer = new javax.swing.JTextArea();
17 | btnBack = new javax.swing.JButton();
18 | jLabel1 = new javax.swing.JLabel();
19 |
20 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
21 |
22 | jPanel1.setBackground(new java.awt.Color(35, 43, 42));
23 |
24 | txtViewAllTrainer.setBackground(new java.awt.Color(35, 43, 42));
25 | txtViewAllTrainer.setColumns(20);
26 | txtViewAllTrainer.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N
27 | txtViewAllTrainer.setForeground(new java.awt.Color(255, 255, 255));
28 | txtViewAllTrainer.setRows(5);
29 | jScrollPane1.setViewportView(txtViewAllTrainer);
30 |
31 | btnBack.setBackground(new java.awt.Color(17, 122, 102));
32 | btnBack.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
33 | btnBack.setForeground(new java.awt.Color(255, 255, 255));
34 | btnBack.setText("Go Back");
35 | btnBack.setBorder(null);
36 | btnBack.addActionListener(new java.awt.event.ActionListener() {
37 | public void actionPerformed(java.awt.event.ActionEvent evt) {
38 | btnBackActionPerformed(evt);
39 | }
40 | });
41 |
42 | jLabel1.setFont(new java.awt.Font("Tahoma", 1, 22)); // NOI18N
43 | jLabel1.setForeground(new java.awt.Color(255, 255, 255));
44 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
45 | jLabel1.setText("View All Trainers ");
46 |
47 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
48 | jPanel1.setLayout(jPanel1Layout);
49 | jPanel1Layout.setHorizontalGroup(
50 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
51 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
52 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
53 | .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
54 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
55 | .addGap(0, 15, Short.MAX_VALUE)
56 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 395, javax.swing.GroupLayout.PREFERRED_SIZE)
57 | .addGap(11, 11, 11)))
58 | .addContainerGap())
59 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
60 | .addGap(0, 0, Short.MAX_VALUE)
61 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)
62 | .addGap(126, 126, 126))
63 | );
64 | jPanel1Layout.setVerticalGroup(
65 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
66 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
67 | .addContainerGap(22, Short.MAX_VALUE)
68 | .addComponent(jLabel1)
69 | .addGap(18, 18, 18)
70 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 376, javax.swing.GroupLayout.PREFERRED_SIZE)
71 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
72 | .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
73 | .addGap(12, 12, 12))
74 | );
75 |
76 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
77 | getContentPane().setLayout(layout);
78 | layout.setHorizontalGroup(
79 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
80 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
81 | );
82 | layout.setVerticalGroup(
83 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
84 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
85 | );
86 |
87 | pack();
88 | }// //GEN-END:initComponents
89 |
90 | private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackActionPerformed
91 | dispose();
92 | JFrameTrainerMenu trainerMenu = new JFrameTrainerMenu();
93 | trainerMenu.setVisible(true);
94 | }//GEN-LAST:event_btnBackActionPerformed
95 |
96 | public static void main(String args[]) {
97 | java.awt.EventQueue.invokeLater(new Runnable() {
98 | public void run() {
99 | new JFrameViewAllTrainers().setVisible(true);
100 | }
101 | });
102 | }
103 | // Variables declaration - do not modify//GEN-BEGIN:variables
104 | private javax.swing.JButton btnBack;
105 | private javax.swing.JLabel jLabel1;
106 | private javax.swing.JPanel jPanel1;
107 | private javax.swing.JScrollPane jScrollPane1;
108 | private javax.swing.JTextArea txtViewAllTrainer;
109 | // End of variables declaration//GEN-END:variables
110 | }
111 |
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/Machine.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import java.io.*;
3 | interface GymMachine{
4 | public String bookMachine(Member m);
5 | public String cancelBooking(int regId);
6 | public String getAllBookings();
7 |
8 | }
9 |
10 | class Machine implements Serializable, GymMachine{
11 | private int regId;
12 | private String name;
13 | private String brand;
14 | private String model;
15 | private double maxWeightCapacity;
16 | private double machineWeight;
17 | private String type;
18 | private static final long serialVersionUID = -7664452136969625334L;
19 | private Member[] bookings = new Member[8]; //Because we allow only 8 bookings per machine in one day
20 | public Machine(){
21 | regId = 0;
22 | name = null;
23 | brand = null;
24 | model = null;
25 | maxWeightCapacity = 0.0;
26 | machineWeight = 0.0;
27 | type = null;
28 | for(int i = 0; i < bookings.length; i++){
29 | bookings[i] = null;
30 | }
31 | }
32 | public Machine(int regId, String name, String brand, String model, double maxWeightCapacity, double machineWeight,
33 | String type){
34 | this.regId = regId;
35 | this.name = name;
36 | this.brand = brand;
37 | this.model = model;
38 | this.maxWeightCapacity = maxWeightCapacity;
39 | this.machineWeight = machineWeight;
40 | this.type = type;
41 | for(int i = 0; i < bookings.length; i++){
42 | bookings[i] = null;
43 | }
44 | }
45 | public void setRegId(int regId){
46 | this.regId = regId;
47 | }
48 | public int getRegId(){
49 | return regId;
50 | }
51 | public void setName(String name){
52 | this.name = name;
53 | }
54 | public String getName(){
55 | return name;
56 | }
57 | public void setBrand(String brand){
58 | this.brand = brand;
59 | }
60 | public String getBrand(){
61 | return brand;
62 | }
63 | public void setModel(String model){
64 | this.model = model;
65 | }
66 | public String getModel(){
67 | return model;
68 | }
69 | public void setMaxWeightCapacity(double maxWeightCapacity){
70 | this.maxWeightCapacity = maxWeightCapacity;
71 | }
72 | public double getMaxWeightCapacity(){
73 | return maxWeightCapacity;
74 | }
75 | public void setMachineWeight(double machineWeight){
76 | this.machineWeight = machineWeight;
77 | }
78 | public double getMachineWeight(){
79 | return machineWeight;
80 | }
81 | public void setType(String type){
82 | this.type = type;
83 | }
84 | public String getType(){
85 | return type;
86 | }
87 | public void setBookings(Member[] bookings){
88 | this.bookings = bookings;
89 | }
90 | public Member[] getBookings(){
91 | return bookings;
92 | }
93 |
94 | @Override
95 | public String bookMachine(Member member) {
96 | if(member.getPayment().getOutstandingBalance() != 0.0){
97 | return "Sadly Can't book this machine because you havce out standing balance";
98 | }
99 | for (int i = 0; i < bookings.length; i++) {
100 | if (bookings[i] == member){
101 | return "You already book this machine";
102 | }
103 | }
104 | for(int i = 0; i < bookings.length; i++){
105 | if (bookings[i] == null){
106 | bookings[i] = member;
107 | return "booked";
108 | }
109 | }
110 | return "The machine is completely booked.";
111 | }
112 |
113 | @Override
114 | public String cancelBooking(int regId) {
115 | for(int i = 0; i < bookings.length; i++){
116 | if(bookings[i] != null){
117 | if (bookings[i].regId == regId){
118 | bookings[i] = null;
119 | return "Your Booking canceled";
120 | }
121 | }
122 | }
123 | return "No booking found against the given member reg id" + regId;
124 | }
125 |
126 | @Override
127 | public String getAllBookings(){
128 | String getAllBookingsString = "";
129 | for(int i = 0; i < bookings.length; i++){
130 | if (!(bookings[i] == null)){
131 | getAllBookingsString += "> " + name + "\t\t" + bookings[i].name + " ( " + bookings[i].regId + " )\n";
132 |
133 | }
134 | }
135 | return getAllBookingsString;
136 | }
137 | @Override
138 | public String toString(){
139 | return "\n\t\tMachine Details : " + "\n---------------------------------------------------------------\n"
140 | + "\n\n> Registration Id : " + regId + "\n\n> Name : " + name + "\n\n> Brand : " + brand + "\n\n> Model : " + model
141 | + "\n\n> Maximum Weight Capacity : " + maxWeightCapacity + " Kg\n\n> Machine Weight : " + machineWeight + " Kg\n\n> Machine Type : "
142 | + type + "\n---------------------------------------------------------------\n" ;
143 | }
144 | }
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/Member.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import java.io.*;
3 | class Member extends Person implements Serializable{
4 | private double height;
5 | private double weight;
6 | private double bmi; //Body Mass index
7 | private Payment memberPayment;
8 | private String fitnessGoal;
9 | public Member(){
10 | super();
11 | height = 0.0;
12 | weight = 0.0;
13 | bmi = 0.0;
14 | fitnessGoal = null;
15 | }
16 | public Member(int regId, String name, String gmail, String phoneNum, String address, Date joinDate,
17 | Date dateOfBirth,int age, String gender, double height, double weight,Payment memberPayment,
18 | String fitnessGoal){
19 | super(regId, name, gmail, phoneNum, address, joinDate, dateOfBirth, age, gender);
20 | this.height = height;
21 | this.weight = weight;
22 | this.bmi = (weight / (height * height));
23 | this.memberPayment = memberPayment;
24 | this.fitnessGoal = fitnessGoal;
25 | }
26 | public void setHeight(double height){
27 | this.height = height;
28 | }
29 | public double getHeight(){
30 | return height;
31 | }
32 | public void setWeight(double weight){
33 | this.weight = weight;
34 | }
35 | public double getWeight(){
36 | return weight;
37 | }
38 | public double getBmi(){
39 | return (weight / (height * height));
40 | }
41 | public void setPayment(Payment memberPayment){
42 | this.memberPayment = memberPayment;
43 | }
44 | public Payment getPayment(){
45 | return memberPayment;
46 | }
47 | public void setFitnessGoal(String fitnessGoal){
48 | this.fitnessGoal = fitnessGoal;
49 | }
50 | public String getFitnessGoal(){
51 | return fitnessGoal;
52 | }
53 | @Override
54 | public String getFinancialReport(){
55 | return "Name: " + name + "\nReg id: " + regId + "\nAccount details:\n" + memberPayment.getOutstandingBalance();
56 | }
57 |
58 | public boolean validateHeight(String height){
59 | if(!checkNumberIsdouble(height)){
60 | return false;
61 | }
62 | double height1 = Double.parseDouble(height);
63 | if (height1 > 0 && height1 < 10){
64 | return true;
65 | }
66 | return false;
67 | }
68 |
69 |
70 |
71 | public boolean validateWeight(String weight){
72 | if(!checkNumberIsdouble(weight)){
73 | return false;
74 | }
75 | double weight1 = Double.parseDouble(weight);
76 | if (weight1 > 0 && weight1 < 300){
77 | return true;
78 | }
79 | return false;
80 | }
81 |
82 | public boolean checkNumberIsdouble(String number){
83 | try {
84 | double number1 = Double.parseDouble(number);
85 | }catch (NumberFormatException ex) {
86 | return false;
87 | }
88 | return true;
89 | }
90 | /*@Override
91 | public boolean modifyData(){
92 | return true;
93 | }*/
94 | @Override
95 | public String toString(){
96 | return "\n\t\tMember Details : " + super.toString() +
97 | "\n\n> Height : " + height + " feet\n\n> Weight : " + weight
98 | + " Kg\n\n> BMI (Body Mass Index) : " + getBmi() +
99 | "\n\n> Payment Status : " + memberPayment.checkStatus() +
100 | "\n\n> Outstanding Balance : " + memberPayment.getOutstandingBalance()
101 | + "\n\n> Fitness Goal : " + fitnessGoal +
102 | "\n---------------------------------------------------------------\n" ;
103 | }
104 | }
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/Payment.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import java.io.*;
3 | class Payment implements Serializable{
4 | private double outStandingBalance;
5 | private String creditCardAccountHolder;
6 | private String creditCardNum;
7 | public Payment(){
8 | outStandingBalance = 0.0;
9 | creditCardAccountHolder = null;
10 | creditCardNum = null;
11 | }
12 | public Payment(double outStandingBalance,String creditCardAccountHolder, String creditCardNum){
13 | this.outStandingBalance = outStandingBalance;
14 | this.creditCardAccountHolder = creditCardAccountHolder;
15 | this.creditCardNum = creditCardNum;
16 | }
17 | public void setOutstandingBalance(double outStandingBalance){
18 | this.outStandingBalance = outStandingBalance;
19 | }
20 | public double getOutstandingBalance(){
21 | return outStandingBalance;
22 | }
23 | public void setCreditCardAccountHolder(String creditCardAccountHolder){
24 | this.creditCardAccountHolder = creditCardAccountHolder;
25 | }
26 | public String getCreditCardAccounHolder(){
27 | return creditCardAccountHolder;
28 | }
29 | public void setCreditCardNum(String creditCardNum){
30 | this.creditCardNum = creditCardNum;
31 | }
32 | public String getCreditCardNum(){
33 | return creditCardNum;
34 | }
35 |
36 | public String checkStatus(){
37 | if(outStandingBalance == 0.0){
38 | return "Paid";
39 | }
40 | return "UnPaid";
41 | }
42 |
43 | public void addOutstandingBalance(double balance){
44 | this.outStandingBalance += balance;
45 | }
46 |
47 | public String payOutstandingBalance(double balance){
48 | String result = "";
49 | if(this.outStandingBalance < balance){
50 | return "Error.. Exceed paying limit. Because your outstanding balance is " + this.outStandingBalance;
51 | }
52 | this.outStandingBalance -= balance;
53 | return "Amount Paid Successfully.";
54 | }
55 |
56 | public Boolean validateBalance(String balance){
57 | if(!checkNumberIsdouble(balance)){
58 | return false;
59 | }
60 | double balance1 = Double.parseDouble(balance);
61 | if (balance1 < 0.0) {
62 | return false;
63 | }
64 | return true;
65 | }
66 | public boolean checkNumberIsdouble(String number){
67 | try {
68 | double number1 = Double.parseDouble(number);
69 | }catch (NumberFormatException ex) {
70 | return false;
71 | }
72 | return true;
73 | }
74 |
75 | public boolean validateName(String name){
76 | int count;
77 |
78 | if(name.length() > 30){
79 | return false;
80 | }
81 | count = 0;
82 | for(int i =0; i < name.length(); i++) {
83 | if (!(Character.isLetter(name.charAt(i)) || name.charAt(i) == '.' || name.charAt(i) == ' ')){
84 | count++;
85 | break;
86 | }
87 | }
88 | if (count != 0){
89 | return false;
90 | }
91 | return true;
92 | }
93 |
94 | public boolean validateCreditCard(String num){
95 | boolean isValid = (num.length() == 19) &&
96 | (Character.isDigit(num.charAt(0))) &&
97 | (Character.isDigit(num.charAt(1))) &&
98 | (Character.isDigit(num.charAt(2))) &&
99 | (Character.isDigit(num.charAt(3))) &&
100 | (num.charAt(4) == '-') &&
101 | (Character.isDigit(num.charAt(5))) &&
102 | (Character.isDigit(num.charAt(6))) &&
103 | (Character.isDigit(num.charAt(7))) &&
104 | (Character.isDigit(num.charAt(8))) &&
105 | (num.charAt(9) == '-') &&
106 | (Character.isDigit(num.charAt(10))) &&
107 | (Character.isDigit(num.charAt(11))) &&
108 | (Character.isDigit(num.charAt(12))) &&
109 | (Character.isDigit(num.charAt(13))) &&
110 | (num.charAt(14) == '-') &&
111 | (Character.isDigit(num.charAt(15))) &&
112 | (Character.isDigit(num.charAt(16))) &&
113 | (Character.isDigit(num.charAt(17))) &&
114 | (Character.isDigit(num.charAt(18)));
115 |
116 | return isValid;
117 | }
118 |
119 |
120 | @Override
121 | public String toString(){
122 | if(!((creditCardNum.equals(null)) || creditCardAccountHolder.equals(null))){
123 | return "\n\n\t\tPayment Details" + "\n---------------------------------------------------------------\n" +
124 | "\n> Payment Status : " + checkStatus() + "\n\n> Outstanding Balance : " +
125 | String.valueOf(outStandingBalance) + "\n\n> Credit Card Account holder : " + creditCardAccountHolder +
126 | "\n\n> Credit Card Number : " + creditCardNum.substring(0,4) + "-****-****-" + creditCardNum.substring(15, 19) +
127 | "\n---------------------------------------------------------------\n";
128 | }
129 | return "\n\n\t\tPayment Details" + "\n---------------------------------------------------------------\n" +
130 | "\n> Payment Status : " + checkStatus() + "\n\n> Outstanding Balance : " +
131 | String.valueOf(outStandingBalance) + "\n\n> Credit Card Account holder : No details Found " +
132 | "\n\n> Credit Card Number : No details Found" + "\n---------------------------------------------------------------\n";
133 | }
134 | }
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/Person.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import java.time.*;
3 | import java.io.Serializable;
4 | abstract class Person implements Serializable{
5 | protected int regId;
6 | protected String name;
7 | protected String gmail;
8 | protected String phoneNum;
9 | protected String address;
10 | protected Date joinDate;
11 | protected Date dateOfBirth;
12 | protected int age;
13 | protected String gender;
14 | public Person(){
15 | regId = 0;
16 | name = null;
17 | gmail = null;
18 | phoneNum = null;
19 | address = null;
20 | age = 0;
21 | gender = null;
22 | }
23 | public Person(int regId, String name, String gmail, String phoneNum, String address, Date joinDate,
24 | Date dateOfBirth,int age, String gender){
25 | this.regId = regId;
26 | this.name = name;
27 | this.gmail = gmail;
28 | this.phoneNum = phoneNum;
29 | this.address = address;
30 | this.dateOfBirth = dateOfBirth;
31 | this.joinDate = joinDate;
32 | this.age = age;
33 | this.gender = gender;
34 | }
35 | abstract String getFinancialReport();
36 | @Override
37 | public String toString(){
38 | return "\n---------------------------------------------------------------\n" +
39 | "\n> Registration Id = " + regId +
40 | "\n\n> Name = " + name +
41 | "\n\n> Gmail = " + gmail +
42 | "\n\n> Age = " + age +
43 | " years\n\n> Phone num = " + phoneNum +
44 | "\n\n> Address = " + address +
45 | "\n\n> Joining Date = " + joinDate.toString() +
46 | "\n\n> Date of Birth = " + dateOfBirth.toString() +
47 | "\n\n> Gender = " + gender;
48 | }
49 | public int caluAge(int yearOfBirth){
50 | return (Year.now().getValue() - yearOfBirth);
51 | }
52 |
53 | //..........................................Method to Validate Name....................................................
54 | public boolean validateName(String name){
55 | int count;
56 |
57 | if(name.length() > 30){
58 | return false;
59 | }
60 | count = 0;
61 | for(int i =0; i < name.length(); i++) {
62 | if (!(Character.isLetter(name.charAt(i)) || name.charAt(i) == '.' || name.charAt(i) == ' ')){
63 | count++;
64 | break;
65 | }
66 | }
67 | if (count != 0){
68 | return false;
69 | }
70 | return true;
71 | }
72 | //........................................Method to Validate Phone Number..............................................
73 | public boolean validatePhone(String contactNumber){
74 | int count;
75 | //Validation of Correct format of phone Number.........
76 | if (!((contactNumber.length() == 12 && contactNumber.charAt(4) == '-' && contactNumber.charAt(0) == '0'
77 | && contactNumber.charAt(1) == '3')&&(contactNumber.charAt(2) == '0' || contactNumber.charAt(2) == '2' ||
78 | contactNumber.charAt(2) == '1' || contactNumber.charAt(2) == '4' || contactNumber.charAt(2) == '3'))){
79 | return false;
80 | }
81 | else{
82 | count = 0;
83 | for(int i =0; i < contactNumber.length(); i++) {
84 | if (!(Character.isDigit(contactNumber.charAt(i)))){
85 | if (i != 4) {
86 | count++;
87 | break;
88 | }
89 | }
90 | }
91 | if (count != 0){
92 | return false;
93 | }
94 | }
95 | return true;
96 | }
97 | //..........................................Method to Validate Gmail....................................................
98 | public boolean validateGmail(String gmail){
99 | if(!gmail.endsWith("@gmail.com")){
100 | return false;
101 | }
102 | return true;
103 | }
104 | }
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/Report.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import java.time.LocalDate;
3 | import java.util.*;
4 | class Report{
5 | private Gym gymDetails;
6 |
7 | Report(){
8 | gymDetails = new Gym();
9 | }
10 | public void setGymDetails(Gym gymDetails){
11 | this.gymDetails = gymDetails;
12 | }
13 | public Gym getGymDetails(){
14 | return gymDetails;
15 | }
16 | public String generateFullReport(){
17 | LocalDate currentDate = LocalDate.now();
18 | String lines = "--------------------------------";
19 | String reportDetails ="\n Date : " + currentDate + "\n";
20 | reportDetails += generateTrainerReport() + lines + generateMemberReport() + lines
21 | + generateMachineReport() + lines + generateBookingReport() + lines + generateReportOfOutStandingBalance() + lines
22 | + generateReportOfZeroOutStandingBalance() + lines;
23 | return reportDetails;
24 | }
25 | public String generateTrainerReport(){
26 | String reportDetails = "";
27 | reportDetails += "\n >>> Trainers list\n\n";
28 | ArrayList trainers = gymDetails.getTrainers();
29 | for(Trainer t : trainers){
30 | reportDetails += " " + t.name + " (" + t.regId + ")\n";
31 | }
32 | return reportDetails;
33 | }
34 | public String generateMemberReport(){
35 | String reportDetails = "";
36 | reportDetails += "\n >>> Members list\n\n";
37 | ArrayList members = gymDetails.getMembers();
38 | for(Member m : members){
39 | reportDetails += " " + m.name + " (" + m.regId + ")\n";
40 | }
41 | return reportDetails;
42 | }
43 | public String generateMachineReport(){
44 | String reportDetails = "";
45 | reportDetails += "\n >>> Machines list\n\n";
46 | ArrayList machines = gymDetails.getMachines();
47 | for(Machine m : machines){
48 | reportDetails += " " + m.getName() + " (" + m.getRegId() + ")\n";
49 | }
50 | return reportDetails;
51 | }
52 | public String generateBookingReport(){
53 | String reportDetails = "";
54 | reportDetails += "\n >>> Bookings list\n\n";
55 | reportDetails += gymDetails.viewAllMachineBookings();
56 | return reportDetails;
57 | }
58 | public String generateReportOfOutStandingBalance(){
59 | String reportDetails = "";
60 | reportDetails += "\n >>> Members with OutStanding Balance\n\n";
61 | ArrayList members = gymDetails.getMembers();
62 | for(Member m : members){
63 | if(m.getPayment().checkStatus().equals("UnPaid")){
64 | reportDetails += " " + m.name + " (" + m.regId + ") $" + m.getPayment().getOutstandingBalance() + "\n";
65 | }
66 | }
67 | return reportDetails;
68 | }
69 | public String generateReportOfZeroOutStandingBalance(){
70 | String reportDetails = "";
71 | reportDetails += "\n >>> Members with Zero OutStanding Balance\n\n";
72 | ArrayList members = gymDetails.getMembers();
73 | for(Member m : members){
74 | if(m.getPayment().checkStatus().equals("Paid")){
75 | reportDetails += " " + m.name + " (" + m.regId + ") $" + m.getPayment().getOutstandingBalance() + "\n";
76 | }
77 | }
78 | return reportDetails;
79 | }
80 | }
--------------------------------------------------------------------------------
/Gym management system JAVA OOP GUI/Trainer.java:
--------------------------------------------------------------------------------
1 | package project_oop;
2 | import java.io.Serializable;
3 | class Trainer extends Person implements Serializable{
4 | private String specialization;
5 | private double hourlyRate;
6 | private double weeklyWorkingHours;
7 | private String experienceLevel;
8 | private static final long serialVersionUID = 2286502415981060413L;
9 | public Trainer(){
10 | super();
11 | specialization = null;
12 | hourlyRate = 0.0;
13 | weeklyWorkingHours = 0.0;
14 | experienceLevel = null;
15 | }
16 | public Trainer(int regId, String name, String gmail, String phoneNum, String address, Date joinDate, Date dateOfBirth,int age,
17 | String gender, String specialization, double hourlyRate, double weeklyWorkingHours, String experienceLevel){
18 | super(regId, name, gmail, phoneNum, address, joinDate, dateOfBirth, age, gender);
19 | this.specialization = specialization;
20 | this.hourlyRate = hourlyRate;
21 | this.weeklyWorkingHours = weeklyWorkingHours;
22 | this.experienceLevel = experienceLevel;
23 | }
24 | public void setSpecialization(String specialization){
25 | this.specialization = specialization;
26 | }
27 | public String getSpecialization(){
28 | return specialization;
29 | }
30 | public void setHourlyRate(double hourlyRate){
31 | this.hourlyRate = hourlyRate;
32 | }
33 | public double getHourlyRate(){
34 | return hourlyRate;
35 | }
36 | public void setWeeklyWorkingHours(double weeklyWorkingHours){
37 | this.weeklyWorkingHours = weeklyWorkingHours;
38 | }
39 | public double getWeeklyWorkingHours(){
40 | return weeklyWorkingHours;
41 | }
42 | public void setExperienceLevel(String experienceLevel){
43 | this.experienceLevel = experienceLevel;
44 | }
45 | public String getExperienceLevel(){
46 | return experienceLevel;
47 | }
48 | public double calculSalary(){
49 | return weeklyWorkingHours * hourlyRate;
50 | }
51 | @Override
52 | public String getFinancialReport(){
53 | return "Name: " + name + "\nReg id: " + regId + "\nWeekly Salary:\n" + calculSalary();
54 | }
55 | public boolean validateWeeklyWorkingHours(String hours){
56 | if(!checkNumberIsdouble(hours)){
57 | return false;
58 | }
59 | double number = Double.parseDouble(hours);
60 | if (number < 0.0 || number > 168.0){
61 | return false;
62 | }
63 | return true;
64 | }
65 | public boolean validateHourlyRate(String rate){
66 | if(!checkNumberIsdouble(rate)){
67 | return false;
68 | }
69 | double rate1 = Double.parseDouble(rate);
70 | if(rate1 < 0.0){
71 | return false;
72 | }
73 | return true;
74 | }
75 |
76 | public boolean checkNumberIsdouble(String number){
77 | try {
78 | double number1 = Double.parseDouble(number);
79 | }catch (NumberFormatException ex) {
80 | return false;
81 | }
82 | return true;
83 | }
84 | @Override
85 | public String toString(){
86 | return "\n\t\tTrainer Details : " + super.toString() + "\n\n> Specialization : " + specialization + "\n\n> Hourly Rate : " + hourlyRate
87 | + "\n\n> Weekly Working Hours : " + weeklyWorkingHours + "\n\n> Salary : " + calculSalary() + " $" + "\n\n> Experience Level : " + experienceLevel
88 | + "\n---------------------------------------------------------------\n" ;
89 | }
90 | }
--------------------------------------------------------------------------------
/Project Code zip file.rar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/Project Code zip file.rar
--------------------------------------------------------------------------------
/Project Report.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/Project Report.pdf
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Gym Management System with GUI
2 |
3 | This project is a Java-based gym management system developed using object-oriented programming principles and a graphical user interface (GUI). It provides a comprehensive solution for managing various aspects of a gym, including member registration, trainer management, machine booking, financial accounts, and reporting. This project built with NetBeans and the Swing/AWT package.
4 |
5 | ## Features
6 |
7 | - **Login**: Users can securely authenticate with a username and password to access the system.
8 |
9 | 
10 | - **Main Menu**:
11 |
12 | 
13 | - **Member Management**: Add, view, search, and delete member records with ease.
14 |
15 | 
16 | - **Trainer Management**: Add, view, search, and delete trainer records with ease.
17 |
18 | 
19 | - **Machine Booking**: Allow members to book gym machines, with automatic registration number generation and booking restrictions.
20 |
21 | 
22 | - **Financial Accounts**: Track member balances, make individual or bulk payments, and manage financial records.
23 |
24 | 
25 | - **Reports**: Generate valuable reports for insights into members, bookings, financial records, and more.
26 |
27 | 
28 |
29 | ## Getting Started
30 |
31 | To get started with the gym management system, follow these steps:
32 |
33 | 1. Clone the repository by clicking on this link: [GitHub Repository](https://github.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project)
34 | 2. Set up your Java development environment.
35 | 3. Compile and run the project using your preferred Java IDE or build tools.
36 |
37 | ## Contributors
38 |
39 | - Kashif Abbas Kazmi
40 | - Muhammad Sarim
41 |
42 | Feel free to contribute, raise issues, or suggest improvements.
43 |
--------------------------------------------------------------------------------
/ScreenShots of System/Add Machine.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Add Machine.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Add Member.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Add Member.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Add Trainer.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Add Trainer.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Add balance to all.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Add balance to all.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Add balance to specific.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Add balance to specific.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Booking menu.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Booking menu.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Cancel booking.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Cancel booking.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Change login.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Change login.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Delete machine.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Delete machine.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Delete trainer.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Delete trainer.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Machine menu.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Machine menu.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Main menu.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Main menu.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Member menu.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Member menu.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Modify Trainer.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Modify Trainer.jpg
--------------------------------------------------------------------------------
/ScreenShots of System/Modify member.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Modify member.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Pay outstanding balance.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Pay outstanding balance.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Report menu.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Report menu.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Search Machine info.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Search Machine info.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Search Member info.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Search Member info.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Search Trainer info.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Search Trainer info.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/Trainer menu.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/Trainer menu.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/View all booking.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/View all booking.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/View all machines.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/View all machines.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/View all members.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/View all members.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/View all trainers.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/View all trainers.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/accounts menu.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/accounts menu.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/add booking.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/add booking.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/delete member.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/delete member.PNG
--------------------------------------------------------------------------------
/ScreenShots of System/login.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/ScreenShots of System/login.PNG
--------------------------------------------------------------------------------
/UML Diagram.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KaShiekzmi/Gym-Management-System-GUI-OOP-Java-Project/f81917d0c8b7f17fa152b339d981c71c9e992c73/UML Diagram.pdf
--------------------------------------------------------------------------------