private void populateTable() {
        //check so we arent already trying to update the table, might get nasty results (i did when i made this) if we update the table from alot of different threads.
        if (thread != null && thread.getState() == State.TERMINATED || thread.getState() == State.NEW) {
            thread = new Thread(new Runnable() {
                @Override
                public void run() {
                    ArrayList<Object[]> results = avalibleResults();
                    SwingUtilities.invokeLater(new Runnable() { //need to update the UI on the EDT, not on the thread (took a while to figure out)
                        @Override
                        public void run() {
                            DefaultTableModel dtm = (DefaultTableModel) tableKomp.getModel();
                            dtm.setRowCount(0); //remove all rows before we populate
                            // add rows to the table
                            if (results != null) {
                                for (Object[] ar : results) {
                                    dtm.addRow(ar);
                                }
                            }
                        }
                    });
                }
            });
            thread.start();
        }
    }