private Application() {
        try {

            System.out.println("Wachtwoord:");
            Scanner sc = new Scanner(System.in);
            pw = sc.nextLine();
            swt = new Thread(new Runnable() {

                @Override
                public void run() {
                    try {
                        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                    } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
                    }
                    fr = new JFrame("Chiro Bevere Administratie");
                    tm = new ChiroTableModel();
                    t = new JTable();
                    jp = new JPanel(new BorderLayout());
                    jp.add(t, BorderLayout.CENTER);

                    //JCombobox opbouwen voor het selecteren van de afdelingen
                    classes = new String[]{"Ribbel", "Speelclub", "Rakwi", "Tito", "Keti", "Aspi", "Leiding", "Oud-Leiding"};
                    final JComboBox b = new JComboBox(classes);
                    //Zorgen dat de combobox filtert
                    b.addActionListener(new ActionListener() {

                        @Override
                        public void actionPerformed(ActionEvent ae) {
                            try {
                                PreparedStatement p = conn.prepareStatement("SELECT * FROM ((SELECT * FROM CH_Lid WHERE Afdeling=?) AS lid LEFT JOIN CH_Familie ON lid.FamilieID = CH_Familie.FamilieID)");
                                p.setString(1, classes[b.getSelectedIndex()]);
                                showNewInfo(p);
                            } catch (SQLException ex) {
                                Logger.getLogger(Application.class.getName()).log(Level.SEVERE, null, ex);
                            }
                        }
                    });
                    jp.add(b, BorderLayout.NORTH);
                    fr.setContentPane(jp);

                    //De connectie moet eerst afgesloten worden
                    fr.setDefaultCloseOperation(0);

                    //Menu aanmaken
                    JMenuBar jmb = new JMenuBar();
                    JMenu jm = new JMenu("Een menu!");
                    JMenuItem jmi = new JMenuItem(new AbstractAction("Voeg nieuwe gebruiker toe") {

                        @Override
                        public void actionPerformed(ActionEvent ae) {
                            JDialog jd = new NieuweGebruikerDialoog(fr);
                            jd.setVisible(true);
                        }
                    });
                    JMenuItem jmi2 = new JMenuItem(new AbstractAction("Verwijder gebruiker") {

                        @Override
                        public void actionPerformed(ActionEvent ae) {
                            try {
                                PreparedStatement p = conn.prepareStatement("DELETE FROM CH_Lid WHERE LidID = ?");
                                p.setInt(1, ((Integer) tm.getValueAt(t.getSelectedRow(), 0)));
                                p.execute();
                                renewInfo();
                            } catch (SQLException ex) {
                                Logger.getLogger(Application.class.getName()).log(Level.SEVERE, null, ex);
                            }

                        }
                    });

                    JMenuItem jmi3 = new JMenuItem(new AbstractAction("Ga naar het volgend werkjaar") {

                        @Override
                        public void actionPerformed(ActionEvent ae) {
                            try {
                                PreparedStatement p = conn.prepareStatement("UPDATE CH_Lid SET Jaar = Jaar+1");
                                p.execute();
                                for (int i = 0; i < 6; i++) {
                                    PreparedStatement ps = conn.prepareStatement("UPDATE CH_Lid SET Afdeling = ?, Jaar = ? WHERE Jaar = ? AND Afdeling = ?");
                                    ps.setString(1, classes[i + 1]);
                                    ps.setInt(2, 1);
                                    ps.setInt(3, 3);
                                    ps.setString(4, classes[i]);
                                    ps.execute();
                                }
                                renewInfo();
                            } catch (SQLException ex) {
                                Logger.getLogger(Application.class.getName()).log(Level.SEVERE, null, ex);
                            }
                        }
                    });

                    jm.add(jmi);
                    jm.add(jmi2);
                    jm.add(jmi3);
                    jmb.add(jm);
                    fr.setJMenuBar(jmb);

                    //Connectie afsluiten wanneer het venster gesloten wordt
                    fr.addWindowListener(new WindowAdapter() {

                        @Override
                        public void windowClosing(WindowEvent we) {
                            closeApplication();
                        }
                    });
                }
            });
            SwingUtilities.invokeLater(swt);
            //Verbinding make
            conn = dbConnect("jdbc:mysql://chirobevere.be/jnet1231_ledenlijst", "donothack", pw);
            //Gegevens afhalen
            PreparedStatement p = conn.prepareStatement("SELECT * FROM (CH_Lid LEFT JOIN CH_Familie ON CH_Lid.FamilieID = CH_Familie.FamilieID)");
            currentQuery = conn.prepareStatement("SELECT * FROM CH_Lid");
            showNewInfo(p);
//            Timer t = new Timer(1000, new ActionListener() {
//
//                @Override
//                public void actionPerformed(ActionEvent ae) {
//                    renewInfo();
//                }
//            });
//            t.start();
            fr.setVisible(true);
        } catch (SQLException ex) {
            Logger.getLogger(Application.class.getName()).log(Level.SEVERE, null, ex);
        }
    }