Package club.ui

Source Code of club.ui.MainFrame

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package club.ui;

import club.beans.ConfigBean;
import club.beans.EventBean;
import club.beans.EventStatusBean;
import club.beans.MemberBean;
import club.beans.MembershipTypeBean;
import club.data.DataConfig;
import club.data.DataEvent;
import club.data.DataMember;
import club.data.DataMembership;
import club.ulti.FormatConverter;
import java.awt.Dimension;
import java.awt.event.KeyEvent;
import static java.awt.image.ImageObserver.WIDTH;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import javax.swing.JFrame;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumn;
import javax.swing.text.DefaultEditorKit;

/**
*
* @author sior
*/
public class MainFrame extends javax.swing.JFrame {

    /**
     * Creates new form MainFrame
     */
    public MainFrame() {
        if (initConfig()) {
            //good to go
            this.setVisible(true);
            initComponents();
            initVisible();
            initCCP();
            initEventTable();
            refreshData();
            this.setExtendedState(JFrame.MAXIMIZED_BOTH);
            initCCP();
        };

    }

    //Check if the config file is exist or not and work with it
    private boolean initConfig() {
        DataConfig dataConfig = new DataConfig();
        if (dataConfig.isConfigFileExist()) {
            //System.out.println("Exist, now should try to read the config File");
            ConfigBean configBean;
            //read object from config file
            configBean = dataConfig.readConfigFile();
            if (configBean != null) {
                //start checking object
                // System.out.println("not null");
                if (DataConfig.IsValidDBInfo(configBean)) {
                    //db info is ok, now check the admin
                    if (dataConfig.IsValidAdminInfo(configBean)) {
                        //admin info ok, now we should clear ther admin info then open the main form
                        //configBean.setAdminID(-1);
                        configBean.setAdminAccount("");
                        dataConfig.writeConfigFile(configBean);
                        return true;
                    } else {
                        //admin info is not ok, open login dialog
                        (new Login()).setVisible(true);
                        return false;
                    }
                } else {
                    //db info is not ok, open connect db dialog
                    //   System.out.println("wrong info in file");
                    (new ConnectDBDialog()).setVisible(true);
                    return false;
                }

            } else {
                //there is no config object in file, open coonect db dialog
                // System.out.println("null");
                (new ConnectDBDialog()).setVisible(true);
                return false;
            }
        } else {
            //there is no config file, open coonect db dialog
            (new ConnectDBDialog()).setVisible(true);
            return false;
        }
    }

    private void initCCP() {
        mnu_Cut.setAction(new DefaultEditorKit.CutAction());
        mnu_Cut.setText("Cut");
        mnu_Cut.setMnemonic(KeyEvent.VK_X);
        mnu_Cut.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));
        mnu_Cut.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/Cut.png"))); // NOI18N
        mnu_Copy.setAction(new DefaultEditorKit.CopyAction());
        mnu_Copy.setText("Copy");
        mnu_Copy.setMnemonic(KeyEvent.VK_C);
        mnu_Copy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));
        mnu_Copy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/Copy.png"))); // NOI18N
        mnu_Paste.setAction(new DefaultEditorKit.PasteAction());
        mnu_Paste.setText("Paste");
        mnu_Paste.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));
        mnu_Paste.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/Paste.png"))); // NOI18N
        mnu_Paste.setMnemonic(KeyEvent.VK_V);
    }

    private void initVisible() {
        DataConfig dataConfig = new DataConfig();
        if (dataConfig.isFullControlAdmin()) {
            mnu_AdminManager.setEnabled(true);
            btnRemoveEvent.setVisible(true);
            btn_RemoveMember.setVisible(true);
        } else {
            mnu_AdminManager.setEnabled(false);
            btnRemoveEvent.setVisible(false);
            btn_RemoveMember.setVisible(false);
        }
    }

    /*
     * init and edit, remove table
     */
    private void initEventTable() {
        //tableEvents.setMaximumSize(new Dimension(tableEvents.getWidth(), 300));
        eventColName = new Vector();
        eventColName.add("Event No");
        eventColName.add("Name");
        eventColName.add("Date");
        eventColName.add("Venue");
        eventColName.add("Fee");
        eventColName.add("Status");
        updateEventTable();
    }

    public void updateEventTable() {
        eventData = new Vector();
        List<EventBean> lists = dataEvent.getAllEvents();
        for (EventBean bean : lists) {
            Vector row = new Vector();
            row.add(bean.getEventID());
            row.add(bean.getEventName());
            row.add(FormatConverter.formatDate(bean.getDate()));
            row.add(bean.getVenue());
            row.add(bean.getFee());
            row.add(new EventStatusBean(bean.getStatus()));
            eventData.add(row);
        }
        eventModel = new DefaultTableModel() {
            @Override
            public boolean isCellEditable(int row, int column) {
                //all cells false
                return false;
            }
        };
        eventModel.setDataVector(eventData, eventColName);
        tableEvents.setModel(eventModel);
    }

    private void editEvent() {
        int total = tableEvents.getSelectedRowCount();
        if (total == 1) {
            int row = tableEvents.getSelectedRow();
            Vector dt = (Vector) eventData.get(row);
            int ID = Integer.parseInt(dt.get(0).toString());
            EventBean event = dataEvent.getEventByID(ID);
            int status = event.getStatus();
            if (status != 0 && status != -1) {
                JOptionPane.showMessageDialog(this, "This event is currently happening or over. Can not edit anymore!");
            } else {
                ModifyEvent editEvent = new ModifyEvent(this, rootPaneCheckingEnabled, ID);
                editEvent.setVisible(true);
            }

            updateEventTable();
        } else {
            JOptionPane.showMessageDialog(this, "You must select one and only one row at a time");
        }
    }

    private void removeEvent() {

        int total = tableEvents.getSelectedRowCount();
        if (total == 1) {
            int row = tableEvents.getSelectedRow();
            Vector dt = (Vector) eventData.get(row);
            int ID = Integer.parseInt(dt.get(0).toString());
            if (dataEvent.isRemovable(ID)) {
                int opt = JOptionPane.showConfirmDialog(this, "Are your sure you want to remove this event", "Confirm Dialog", JOptionPane.YES_NO_OPTION);
                if (opt == JOptionPane.YES_OPTION) {
                    boolean flag = dataEvent.removeEventByID(ID);
                    if (flag) {
                        JOptionPane.showMessageDialog(this, "Successfully removed event");
                        updateEventTable();
                    } else {
                        JOptionPane.showMessageDialog(this, "Failed! Please try again!");
                    }
                }
            } else {
                JOptionPane.showMessageDialog(this, "This event's attendance list is not empty. Can not delete!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You must select one and only one row at a time");
        }


    }

    private void makeAttendance() {
        int total = tableEvents.getSelectedRowCount();
        if (total == 1) {
            int row = tableEvents.getSelectedRow();
            Vector dt = (Vector) eventData.get(row);
            int ID = Integer.parseInt(dt.get(0).toString());
            if (dataEvent.getEventByID(ID).getStatus() == -1) {
                JOptionPane.showMessageDialog(this, "This event has been cancelled", "Error", JOptionPane.ERROR_MESSAGE);
            } else {
                AttendanceList joinList = new AttendanceList(this, rootPaneCheckingEnabled, ID);
                joinList.setVisible(true);
            }
        } else {
            JOptionPane.showMessageDialog(this, "You must select one and only one row at a time", "Error", JOptionPane.ERROR_MESSAGE);
        }
    }

    // init Member table
    private void refreshData() {
        DefaultTableModel model = DataMember.getAllMembersAsModel();
        tblMember.setModel(model);
        int rowCount = tblMember.getRowCount();
        // init column status
        for (int i = 0; i < rowCount; i++) {
            int value = (int) tblMember.getValueAt(i, 8);
            if (value == 0) {
                tblMember.setValueAt("Active", i, 8);
            }
            if (value == 1) {
                tblMember.setValueAt("Deactive", i, 8);
            }
            if (value == 2) {
                tblMember.setValueAt("Banned", i, 8);
            }
        }
        // init column title
        for (int i = 0; i < rowCount; i++) {
            int value = (int) tblMember.getValueAt(i, 1);
            if (value == 0) {
                tblMember.setValueAt("Mr", i, 1);
            }
            if (value == 1) {
                tblMember.setValueAt("Mrs", i, 1);
            }
            if (value == 2) {
                tblMember.setValueAt("Miss", i, 1);
            }
        }
        // remove column MembershipTypeID in model
        TableColumn tc = new TableColumn(1);
        tblMember.getColumnModel().removeColumn(tc);
    }
    // end - longpv

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblMember = new javax.swing.JTable();
        btn_EditMember = new javax.swing.JButton();
        tfSearchMember = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        btn_AddMember = new javax.swing.JButton();
        btn_RemoveMember = new javax.swing.JButton();
        jbt_GetReport = new javax.swing.JButton();
        jbt_GetAtttendanceList = new javax.swing.JButton();
        btn_UpdateBalance = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        btnNewEvent = new javax.swing.JButton();
        btnEditEvent = new javax.swing.JButton();
        btnRemoveEvent = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        tableEvents = new javax.swing.JTable();
        btnAttendance = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        tfEventSearch = new javax.swing.JTextField();
        btn_EventReport = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenuApplication = new javax.swing.JMenu();
        mnu_LogOut = new javax.swing.JMenuItem();
        jSeparator6 = new javax.swing.JPopupMenu.Separator();
        mnu_Exit = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenuItem5 = new javax.swing.JMenuItem();
        jSeparator2 = new javax.swing.JPopupMenu.Separator();
        mnu_Cut = new javax.swing.JMenuItem();
        mnu_Copy = new javax.swing.JMenuItem();
        mnu_Paste = new javax.swing.JMenuItem();
        jSeparator3 = new javax.swing.JPopupMenu.Separator();
        mnu_Find = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        mnu_NewMember = new javax.swing.JMenuItem();
        Checkfee = new javax.swing.JMenuItem();
        jSeparator5 = new javax.swing.JPopupMenu.Separator();
        mnu_Membership = new javax.swing.JMenuItem();
        jMenu4 = new javax.swing.JMenu();
        mnu_NewEvent = new javax.swing.JMenuItem();
        mnu_EventType = new javax.swing.JMenuItem();
        jMenu5 = new javax.swing.JMenu();
        mnu_Transaction = new javax.swing.JMenuItem();
        jMenu7 = new javax.swing.JMenu();
        mnu_AdminManager = new javax.swing.JMenuItem();
        jSeparator4 = new javax.swing.JPopupMenu.Separator();
        mnu_PaswordSetting = new javax.swing.JMenuItem();
        jMenu6 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JPopupMenu.Separator();
        mnu_About = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Club Management System");

        tblMember.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(tblMember);

        btn_EditMember.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/edit.png"))); // NOI18N
        btn_EditMember.setText("Edit");
        btn_EditMember.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_EditMemberActionPerformed(evt);
            }
        });

        tfSearchMember.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tfSearchMemberKeyReleased(evt);
            }
        });

        jLabel1.setText("Quick Search");

        btn_AddMember.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/add.png"))); // NOI18N
        btn_AddMember.setText("Add");
        btn_AddMember.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_AddMemberActionPerformed(evt);
            }
        });

        btn_RemoveMember.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/delete.png"))); // NOI18N
        btn_RemoveMember.setText("Remove");
        btn_RemoveMember.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_RemoveMemberActionPerformed(evt);
            }
        });

        jbt_GetReport.setText("Get Report");
        jbt_GetReport.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_GetReportActionPerformed(evt);
            }
        });

        jbt_GetAtttendanceList.setText("Get Attendance History");

        btn_UpdateBalance.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btn_UpdateBalance.setForeground(new java.awt.Color(255, 0, 0));
        btn_UpdateBalance.setText("Update Balance");
        btn_UpdateBalance.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_UpdateBalanceActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 599, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tfSearchMember, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jbt_GetAtttendanceList)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbt_GetReport, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(btn_AddMember, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btn_EditMember, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btn_RemoveMember, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btn_UpdateBalance, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(7, 7, 7)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(tfSearchMember, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1)
                    .addComponent(jbt_GetReport, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jbt_GetAtttendanceList))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 355, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btn_AddMember, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn_EditMember, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn_RemoveMember, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn_UpdateBalance, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jTabbedPane1.addTab("Members", jPanel1);

        btnNewEvent.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/add.png"))); // NOI18N
        btnNewEvent.setText("Add");
        btnNewEvent.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNewEventActionPerformed(evt);
            }
        });

        btnEditEvent.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/edit.png"))); // NOI18N
        btnEditEvent.setText("Edit");
        btnEditEvent.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditEventActionPerformed(evt);
            }
        });

        btnRemoveEvent.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/delete.png"))); // NOI18N
        btnRemoveEvent.setText("Remove");
        btnRemoveEvent.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRemoveEventActionPerformed(evt);
            }
        });

        tableEvents.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane2.setViewportView(tableEvents);

        btnAttendance.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        btnAttendance.setForeground(new java.awt.Color(255, 0, 51));
        btnAttendance.setText("Make Attendance");
        btnAttendance.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAttendanceActionPerformed(evt);
            }
        });

        jLabel2.setText("Quick Search");

        tfEventSearch.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tfEventSearchKeyReleased(evt);
            }
        });

        btn_EventReport.setText("Show Report");
        btn_EventReport.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_EventReportActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tfEventSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btn_EventReport))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(21, 21, 21)
                        .addComponent(btnNewEvent, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(33, 33, 33)
                        .addComponent(btnEditEvent, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(btnRemoveEvent, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(btnAttendance, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 29, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(tfEventSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2)
                    .addComponent(btn_EventReport))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 373, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnNewEvent, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnEditEvent, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnRemoveEvent, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAttendance, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Events", jPanel2);

        jMenuApplication.setText("Application");

        mnu_LogOut.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/Break.png"))); // NOI18N
        mnu_LogOut.setText("Log out");
        mnu_LogOut.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_LogOutActionPerformed(evt);
            }
        });
        jMenuApplication.add(mnu_LogOut);
        jMenuApplication.add(jSeparator6);

        mnu_Exit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));
        mnu_Exit.setText("Exit");
        mnu_Exit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_ExitActionPerformed(evt);
            }
        });
        jMenuApplication.add(mnu_Exit);

        jMenuBar1.add(jMenuApplication);

        jMenu2.setText("Edit");

        jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem4.setText("Undo");
        jMenuItem4.setEnabled(false);
        jMenu2.add(jMenuItem4);

        jMenuItem5.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Y, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem5.setText("Redo");
        jMenuItem5.setEnabled(false);
        jMenu2.add(jMenuItem5);
        jMenu2.add(jSeparator2);

        mnu_Cut.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));
        mnu_Cut.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/Cut.png"))); // NOI18N
        mnu_Cut.setText("Cut");
        jMenu2.add(mnu_Cut);

        mnu_Copy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK));
        mnu_Copy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/Copy.png"))); // NOI18N
        mnu_Copy.setText("Copy");
        jMenu2.add(mnu_Copy);

        mnu_Paste.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.CTRL_MASK));
        mnu_Paste.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/Paste.png"))); // NOI18N
        mnu_Paste.setText("Paste");
        jMenu2.add(mnu_Paste);
        jMenu2.add(jSeparator3);

        mnu_Find.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.CTRL_MASK));
        mnu_Find.setText("Find");
        jMenu2.add(mnu_Find);

        jMenuBar1.add(jMenu2);

        jMenu3.setText("Members");

        mnu_NewMember.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/New.png"))); // NOI18N
        mnu_NewMember.setText("Add members");
        mnu_NewMember.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_NewMemberActionPerformed(evt);
            }
        });
        jMenu3.add(mnu_NewMember);

        Checkfee.setText("Check fee fer month");
        Checkfee.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CheckfeeActionPerformed(evt);
            }
        });
        jMenu3.add(Checkfee);
        jMenu3.add(jSeparator5);

        mnu_Membership.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/Check.png"))); // NOI18N
        mnu_Membership.setText("Manage Membership");
        mnu_Membership.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_MembershipActionPerformed(evt);
            }
        });
        jMenu3.add(mnu_Membership);

        jMenuBar1.add(jMenu3);

        jMenu4.setText("Events");

        mnu_NewEvent.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.CTRL_MASK));
        mnu_NewEvent.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/New.png"))); // NOI18N
        mnu_NewEvent.setText("Add new event");
        mnu_NewEvent.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_NewEventActionPerformed(evt);
            }
        });
        jMenu4.add(mnu_NewEvent);

        mnu_EventType.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/Check.png"))); // NOI18N
        mnu_EventType.setText("Manage Event Type");
        mnu_EventType.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_EventTypeActionPerformed(evt);
            }
        });
        jMenu4.add(mnu_EventType);

        jMenuBar1.add(jMenu4);

        jMenu5.setText("Report");

        mnu_Transaction.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/About.png"))); // NOI18N
        mnu_Transaction.setText("Transaction");
        mnu_Transaction.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_TransactionActionPerformed(evt);
            }
        });
        jMenu5.add(mnu_Transaction);

        jMenuBar1.add(jMenu5);

        jMenu7.setText("Settings");

        mnu_AdminManager.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/Check.png"))); // NOI18N
        mnu_AdminManager.setText("Admin Manager");
        mnu_AdminManager.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_AdminManagerActionPerformed(evt);
            }
        });
        jMenu7.add(mnu_AdminManager);
        jMenu7.add(jSeparator4);

        mnu_PaswordSetting.setText("Password settings");
        mnu_PaswordSetting.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_PaswordSettingActionPerformed(evt);
            }
        });
        jMenu7.add(mnu_PaswordSetting);

        jMenuBar1.add(jMenu7);

        jMenu6.setText("Help");

        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
        jMenuItem1.setText("Help Contents");
        jMenu6.add(jMenuItem1);
        jMenu6.add(jSeparator1);

        mnu_About.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F2, 0));
        mnu_About.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/About.png"))); // NOI18N
        mnu_About.setText("About");
        mnu_About.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnu_AboutActionPerformed(evt);
            }
        });
        jMenu6.add(mnu_About);

        jMenuBar1.add(jMenu6);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void mnu_AboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_AboutActionPerformed
        String mess = "Group 521"
                + "\n Pham Viet Long"
                + "\n Vu Minh Tuan"
                + "\n Pham Ngoc Quang";
        JOptionPane.showMessageDialog(rootPane, mess, "About Us", WIDTH);
    }//GEN-LAST:event_mnu_AboutActionPerformed

    private void mnu_ExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_ExitActionPerformed
        int choice = JOptionPane.showConfirmDialog(rootPane, "Are you sure you want to quit?", "Confirm", JOptionPane.YES_NO_OPTION);
        if (choice == JOptionPane.YES_OPTION) {
            this.dispose();
        }
    }//GEN-LAST:event_mnu_ExitActionPerformed

    private void mnu_NewEventActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_NewEventActionPerformed
        EventEntry newEvent = new EventEntry(this, rootPaneCheckingEnabled);
        newEvent.setVisible(true);
        updateEventTable();
    }//GEN-LAST:event_mnu_NewEventActionPerformed

    private void btnNewEventActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNewEventActionPerformed
        // TODO add your handling code here:
        EventEntry newEvent = new EventEntry(this, rootPaneCheckingEnabled);
        newEvent.setVisible(true);
        updateEventTable();
    }//GEN-LAST:event_btnNewEventActionPerformed

    private void mnu_MembershipActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_MembershipActionPerformed
        MembershipDialog membershipDlg = new MembershipDialog(this, rootPaneCheckingEnabled);
        membershipDlg.setVisible(true);
    }//GEN-LAST:event_mnu_MembershipActionPerformed

    private void mnu_NewMemberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_NewMemberActionPerformed
        NewMemberDialog newMember = new NewMemberDialog(this, rootPaneCheckingEnabled);
        newMember.setVisible(true);
    }//GEN-LAST:event_mnu_NewMemberActionPerformed

    private void btnRemoveEventActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveEventActionPerformed
        removeEvent();
    }//GEN-LAST:event_btnRemoveEventActionPerformed

    private void btnEditEventActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditEventActionPerformed
        editEvent();
    }//GEN-LAST:event_btnEditEventActionPerformed

    private void btn_AddMemberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_AddMemberActionPerformed
        List<MembershipTypeBean> list = DataMembership.getAllTypes();
        if (list.isEmpty()) {
            JOptionPane.showMessageDialog(rootPane, "There is no membership type at the moment. Please add at least one membership type before add a member");
        } else {
            NewMemberDialog newMember = new NewMemberDialog(this, rootPaneCheckingEnabled);
            newMember.setVisible(true);
            refreshData();
        }

    }//GEN-LAST:event_btn_AddMemberActionPerformed

    private void btnAttendanceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAttendanceActionPerformed
        // TODO add your handling code here       
        makeAttendance();
        refreshData();
    }//GEN-LAST:event_btnAttendanceActionPerformed

    private void mnu_EventTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_EventTypeActionPerformed
        EventType eventType = new EventType(this, rootPaneCheckingEnabled);
        eventType.setVisible(true);
    }//GEN-LAST:event_mnu_EventTypeActionPerformed

    private void btn_EditMemberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_EditMemberActionPerformed
        int selectedRow = tblMember.getSelectedRow();
        if (selectedRow == -1) {
            JOptionPane.showMessageDialog(rootPane, "You must chose one member first!", "Error!", JOptionPane.ERROR_MESSAGE);
        } else {
            int id = (int) tblMember.getModel().getValueAt(selectedRow, 0);
            System.out.println(id);
            EditMemberDialog editMemDiag = new EditMemberDialog(this, rootPaneCheckingEnabled, id);
            editMemDiag.setVisible(true);
            refreshData();
        }
    }//GEN-LAST:event_btn_EditMemberActionPerformed

    private void mnu_LogOutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_LogOutActionPerformed
        // TODO add your handling code here:
        this.dispose();
        (new Login()).setVisible(true);
    }//GEN-LAST:event_mnu_LogOutActionPerformed

    private void tfEventSearchKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tfEventSearchKeyReleased
        // TODO add your handling code here:
        String text = tfEventSearch.getText().trim().toLowerCase();
        eventData = new Vector();
        List<EventBean> lists = dataEvent.getAllEvents(text);
        for (EventBean bean : lists) {
            Vector row = new Vector();
            row.add(bean.getEventID());
            row.add(bean.getEventName());
            row.add(FormatConverter.formatDate(bean.getDate()));
            row.add(bean.getVenue());
            row.add(bean.getFee());
            row.add(new EventStatusBean(bean.getStatus()));
            eventData.add(row);
        }
        eventModel = new DefaultTableModel() {
            @Override
            public boolean isCellEditable(int row, int column) {
                //all cells false
                return false;
            }
        };
        eventModel.setDataVector(eventData, eventColName);
        tableEvents.setModel(eventModel);
    }//GEN-LAST:event_tfEventSearchKeyReleased

    private void btn_RemoveMemberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_RemoveMemberActionPerformed
        // TODO add your handling code here:
        int total = tblMember.getSelectedRowCount();
        int selectedRow = tblMember.getSelectedRow();
        if (selectedRow == -1) {
            JOptionPane.showMessageDialog(rootPane, "You must chose one member first!", "Error!", JOptionPane.ERROR_MESSAGE);
        } else {
            int id = (int) tblMember.getModel().getValueAt(selectedRow, 0);
            System.out.println(id);
            if (DataMember.removeMemberByID(id)) {
                JOptionPane.showMessageDialog(rootPane, "Successfully removed member");
                refreshData();
            } else {
                JOptionPane.showMessageDialog(rootPane, "Can not remove member! Try again!", "Error!", JOptionPane.ERROR_MESSAGE);
            }
        }
    }//GEN-LAST:event_btn_RemoveMemberActionPerformed

    private void mnu_TransactionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_TransactionActionPerformed
        // TODO add your handling code here:
        Transaction tran = new Transaction(this, rootPaneCheckingEnabled, "none", "none");
        tran.setVisible(true);
    }//GEN-LAST:event_mnu_TransactionActionPerformed

    private void mnu_AdminManagerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_AdminManagerActionPerformed
        // TODO add your handling code here:
        (new AdminManagerDialog(this, true)).setVisible(true);
    }//GEN-LAST:event_mnu_AdminManagerActionPerformed

    private void jbt_GetReportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_GetReportActionPerformed
        // TODO add your handling code here:
        int selectedRow = tblMember.getSelectedRow();
        if (selectedRow == -1) {
            JOptionPane.showMessageDialog(rootPane, "You must chose one member first!", "Error!", JOptionPane.ERROR_MESSAGE);
        } else {
            int id = (int) tblMember.getModel().getValueAt(selectedRow, 0);
            Transaction tran = new Transaction(this, rootPaneCheckingEnabled, "mem", Integer.toString(id));
            tran.setVisible(true);
        }
    }//GEN-LAST:event_jbt_GetReportActionPerformed

    private void btn_EventReportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_EventReportActionPerformed
        // TODO add your handling code here:
        int selectedRow = tableEvents.getSelectedRow();
        if (selectedRow == -1) {
            JOptionPane.showMessageDialog(rootPane, "You must chose one member first!", "Error!", JOptionPane.ERROR_MESSAGE);
        } else {
            int id = (int) tblMember.getModel().getValueAt(selectedRow, 0);
            Transaction tran = new Transaction(this, rootPaneCheckingEnabled, "eve", Integer.toString(id));
            tran.setVisible(true);
        }
    }//GEN-LAST:event_btn_EventReportActionPerformed

    private void tfSearchMemberKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tfSearchMemberKeyReleased
        // TODO add your handling code here:
        DefaultTableModel model = DataMember.getAllMembersAsModel(tfSearchMember.getText());
        tblMember.setModel(model);
        int rowCount = tblMember.getRowCount();
        // init column status
        for (int i = 0; i < rowCount; i++) {
            int value = (int) tblMember.getValueAt(i, 8);
            if (value == 0) {
                tblMember.setValueAt("Active", i, 8);
            }
            if (value == 1) {
                tblMember.setValueAt("Deactive", i, 8);
            }
            if (value == 2) {
                tblMember.setValueAt("Banned", i, 8);
            }
        }
        // init column title
        for (int i = 0; i < rowCount; i++) {
            int value = (int) tblMember.getValueAt(i, 1);
            if (value == 0) {
                tblMember.setValueAt("Mr", i, 1);
            }
            if (value == 1) {
                tblMember.setValueAt("Mrs", i, 1);
            }
            if (value == 2) {
                tblMember.setValueAt("Miss", i, 1);
            }
        }
        // remove column MembershipTypeID in model
        TableColumn tc = new TableColumn(1);
        tblMember.getColumnModel().removeColumn(tc);
    }//GEN-LAST:event_tfSearchMemberKeyReleased

    private void mnu_PaswordSettingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnu_PaswordSettingActionPerformed
        // TODO add your handling code here:
        (new Password(this, rootPaneCheckingEnabled)).setVisible(true);
    }//GEN-LAST:event_mnu_PaswordSettingActionPerformed

    private void btn_UpdateBalanceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_UpdateBalanceActionPerformed
        // TODO add your handling code here:
        int selectedRow = tblMember.getSelectedRow();
        if (selectedRow == -1) {
            JOptionPane.showMessageDialog(rootPane, "You must chose one member first!", "Error!", JOptionPane.ERROR_MESSAGE);
        } else {
            int id = (int) tblMember.getModel().getValueAt(selectedRow, 0);
            (new updateBalance(null, rootPaneCheckingEnabled, id)).setVisible(true);
            MemberBean mem = new MemberBean();
            mem = DataMember.getMemberByID(id);
            Double balance = mem.getBalance();
        }
    }//GEN-LAST:event_btn_UpdateBalanceActionPerformed

    private void CheckfeeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CheckfeeActionPerformed
        // TODO add your handling code here:
        DataMember dt=new DataMember();
        DataConfig dataConfig = new DataConfig();
        ConfigBean config = dataConfig.readConfigFile();
        int adminID = config.getAdminID();
        dt.checkfee(adminID);
    }//GEN-LAST:event_CheckfeeActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainFrame();
            }
        });
    }
    private DefaultTableModel eventModel;
    private Vector eventData;
    private Vector eventColName;
    DataEvent dataEvent = new DataEvent();
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem Checkfee;
    private javax.swing.JButton btnAttendance;
    private javax.swing.JButton btnEditEvent;
    private javax.swing.JButton btnNewEvent;
    private javax.swing.JButton btnRemoveEvent;
    private javax.swing.JButton btn_AddMember;
    private javax.swing.JButton btn_EditMember;
    private javax.swing.JButton btn_EventReport;
    private javax.swing.JButton btn_RemoveMember;
    private javax.swing.JButton btn_UpdateBalance;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenu jMenu6;
    private javax.swing.JMenu jMenu7;
    private javax.swing.JMenu jMenuApplication;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JPopupMenu.Separator jSeparator1;
    private javax.swing.JPopupMenu.Separator jSeparator2;
    private javax.swing.JPopupMenu.Separator jSeparator3;
    private javax.swing.JPopupMenu.Separator jSeparator4;
    private javax.swing.JPopupMenu.Separator jSeparator5;
    private javax.swing.JPopupMenu.Separator jSeparator6;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JButton jbt_GetAtttendanceList;
    private javax.swing.JButton jbt_GetReport;
    private javax.swing.JMenuItem mnu_About;
    private javax.swing.JMenuItem mnu_AdminManager;
    private javax.swing.JMenuItem mnu_Copy;
    private javax.swing.JMenuItem mnu_Cut;
    private javax.swing.JMenuItem mnu_EventType;
    private javax.swing.JMenuItem mnu_Exit;
    private javax.swing.JMenuItem mnu_Find;
    private javax.swing.JMenuItem mnu_LogOut;
    private javax.swing.JMenuItem mnu_Membership;
    private javax.swing.JMenuItem mnu_NewEvent;
    private javax.swing.JMenuItem mnu_NewMember;
    private javax.swing.JMenuItem mnu_Paste;
    private javax.swing.JMenuItem mnu_PaswordSetting;
    private javax.swing.JMenuItem mnu_Transaction;
    private javax.swing.JTable tableEvents;
    private javax.swing.JTable tblMember;
    private javax.swing.JTextField tfEventSearch;
    private javax.swing.JTextField tfSearchMember;
    // End of variables declaration//GEN-END:variables
}
TOP

Related Classes of club.ui.MainFrame

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.