private JComponent getRegisterPanel() {
        
        //Set up Register table.
        tableModel = new RegisterTableModel();
        table = new JTable(tableModel);
        
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        
        RowSorter<TableModel> sorter = new TableRowSorter(tableModel);
        table.setRowSorter(sorter);
        
        table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            @Override
            public void valueChanged(ListSelectionEvent e) {
                if(table.getSelectedRow() > -1) {
                    int tableRow = table.getSelectedRow();
                    int modelRow = table.convertRowIndexToModel(tableRow);
                    selectedRegisterItem = tableModel.getRegisterItem(modelRow);
                }
            }
        });
        
        table.addMouseListener(new MouseAdapter() {
            
            @Override
            public void mouseReleased(MouseEvent e) {
                int r = table.rowAtPoint(e.getPoint());
                if (r >= 0 && r < table.getRowCount()) {
                    table.setRowSelectionInterval(r, r);
                } else {
                    table.clearSelection();
                }

                int rowindex = table.getSelectedRow();
                if (rowindex < 0)
                    return;
                //if (e.isPopupTrigger() && e.getComponent() instanceof JTable ) {
                //    JPopupMenu popup = getPopupMenu();
                //    popup.show(e.getComponent(), e.getX(), e.getY());
                //}
            }
            
            @Override
            public void mouseClicked(MouseEvent e) {
                System.out.println("RegisterTableGUI - Mouse Clicked");
                int r = table.rowAtPoint(e.getPoint());
                if (r >= 0 && r < table.getRowCount()) {
                    table.setRowSelectionInterval(r, r);
                } else {
                    table.clearSelection();
                }
                
                if (e.getClickCount() == 2) {
                    JTable target = (JTable)e.getSource();
                    int row = target.getSelectedRow();
                    //int column = target.getSelectedColumn();

                    if (row < 0)
                        return;
                    
                    //Schedule a job for the event dispatch thread:
                    //creating and showing this application's GUI.
                    SwingUtilities.invokeLater(new Runnable() {
                        @Override
                        public void run() {
                            RegisterItemFrameGUI.createAndShowGUI(SwingUtilities.getWindowAncestor(table),
                                                                  selectedRegisterItem,
                                                                  tableModel);
                        }
                    });        
                }
            }
        });        
        
        table.setComponentPopupMenu(getPopupMenu());
       
        //Allow only one row at a time to be selected.
        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        table.changeSelection(0, 0, false, false);
        ColumnsAutoSizer.sizeColumnsToFit(table);
        
        //Hide Status Column
        table.removeColumn(table.getColumnModel().getColumn(11));
        
        //Set up RegisterItems panel.
        JPanel registerPanel = new JPanel();
        registerPanel.setLayout(new BorderLayout());
        registerPanel.add(new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED),
                          BorderLayout.CENTER);
        
        return registerPanel;
        
    }