private void initComponents() {
        setTitle("Database Export");
        TableListPanel = new javax.swing.JScrollPane();
        TableList = new javax.swing.JList();
        ExportSubmitButton = new javax.swing.JButton();
        SelectAllCheck = new javax.swing.JCheckBox();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setBounds(new java.awt.Rectangle(100, 100, 600, 400));
        
        contentPane = new JPanel();
        contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
        contentPane.setLayout(new BorderLayout(0, 0));
        setContentPane(contentPane);
        
        
        TableList.setPreferredSize(new Dimension(500,300));
        DefaultListModel tableModel = new DefaultListModel();
        for(Object str : names) {
            //System.out.println(str);
            tableModel.addElement(str);
        }
        TableList.setModel(tableModel);
        TableListPanel.setViewportView(TableList);
        
        contentPane.add(TableList, BorderLayout.NORTH);
        
        JPanel panel = new JPanel();
        contentPane.add(panel, BorderLayout.SOUTH);
        JButton submitButton = new JButton("Save to .zip");
        submitButton.addActionListener(
                new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent arg0) {
                        JFileChooser chooser = new JFileChooser();
                        chooser.setDialogTitle("Save");
                        chooser.setApproveButtonText("Save");
                        String filePath = "";
                        String fileName = "";
                        String zipLocation = "";
                        int option = chooser.showOpenDialog(DatabaseExportFrame.this);
                        if(option == JFileChooser.APPROVE_OPTION) {
                            List<String> selectedTables = new ArrayList<String>();
                            selectedTables = TableList.getSelectedValuesList();
                            File file = chooser.getSelectedFile();
                            File chosen = chooser.getCurrentDirectory();
                            filePath = chosen.getPath();
                            fileName = file.getName();
                            zipLocation = filePath + "\\" + fileName;
                            if(!fileName.contains(".zip"))
                                zipLocation += ".zip";
                            try{
                            DatabaseExporter.exportDatabase(selectedTables, zipLocation);
                            getFrame().dispose();
                            }catch(Exception e)
                            {
                                JOptionPane.showMessageDialog(rootPane, "Couldn't export", "Error", JOptionPane.INFORMATION_MESSAGE);
                            }
                        }  
                    }                     
                });
        panel.add(submitButton);
        
        JCheckBox selectAll = new JCheckBox();
        selectAll.setLabel("Select all");
        selectAll.addItemListener(new ItemListener() 
            {
                @Override
                public void itemStateChanged(ItemEvent e)
                {
                    if(e.getStateChange() == ItemEvent.SELECTED)
                    {
                        int[] indices = new int[names.size()];
                        for(int iter = 0; iter < names.size(); iter++)
                        {
                            indices[iter] = iter;
                        }
                        TableList.setSelectedIndices(indices);
                        TableList.setEnabled(false);
                    } 
                    else
                    {
                        TableList.clearSelection();
                        TableList.setEnabled(true);
                    }
                }
            });
        panel.add(selectAll);
        

    }