public TabbedPanel(ClientImpl c, MainFrame parent) {
        initComponents();
        client = c;
        client.addObserver(this);
        this.parent = parent;

        welcomeLabel.setText("Welcome " + client.clientName);

        ChangeListener changeListener = new ChangeListener() {
            public void stateChanged(ChangeEvent changeEvent) {
                JTabbedPane sourceTabbedPane = (JTabbedPane) changeEvent.getSource();
                int index = sourceTabbedPane.getSelectedIndex();
                System.out.println("Tab changed to: " + sourceTabbedPane.getTitleAt(index));
                if (index == 1) {
                    try {
                        client.yourfiles = client.servObj.loadAllFilesof(client.clientName);
                        client.notifyAll(EventEnum.YOURFILE);

                    } catch (RemoteException ex) {
                        JOptionPane.showMessageDialog(jPanel1, ex.getMessage());
                    }
                }

            }
        };
        this.jTabbedPane1.addChangeListener(changeListener);
        this.yourFilesTable.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent e) {
                // Left mouse click
                if (SwingUtilities.isLeftMouseButton(e)) {
                    // Do something
                } // Right mouse click
                else if (SwingUtilities.isRightMouseButton(e)) {
                    // get the coordinates of the mouse click
                    Point p = e.getPoint();

                    // get the row index that contains that coordinate
                    int rowNumber = yourFilesTable.rowAtPoint(p);

                    // Get the ListSelectionModel of the JTable
                    ListSelectionModel model = yourFilesTable.getSelectionModel();

                    // set the selected interval of rows. Using the "rowNumber"
                    // variable for the beginning and end selects only that one row.
                    model.setSelectionInterval(rowNumber, rowNumber);
                    String fname = (String) yourFilesTable.getValueAt(rowNumber, 0);
                    PopUpMenu menu = new PopUpMenu(client, fname, PopUpMenu.FROMYOURFILES, thispanel);
                    menu.show(e.getComponent(), e.getX(), e.getY());
                }
            }
        });

        this.allFilesTable.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent e) {
                // Left mouse click
                if (SwingUtilities.isLeftMouseButton(e)) {
                    // Do something
                } // Right mouse click
                else if (SwingUtilities.isRightMouseButton(e)) {
                    // get the coordinates of the mouse click
                    Point p = e.getPoint();

                    // get the row index that contains that coordinate
                    int rowNumber = allFilesTable.rowAtPoint(p);

                    // Get the ListSelectionModel of the JTable
                    ListSelectionModel model = allFilesTable.getSelectionModel();

                    // set the selected interval of rows. Using the "rowNumber"
                    // variable for the beginning and end selects only that one row.
                    model.setSelectionInterval(rowNumber, rowNumber);
                    String fname = (String) allFilesTable.getValueAt(rowNumber, 0);
                    PopUpMenu menu = new PopUpMenu(client, fname, PopUpMenu.FROMALLFILES, thispanel);
                    menu.show(e.getComponent(), e.getX(), e.getY());
                }
            }
        });

        updateStatistics();

    }