public TableModel(Connection conn) throws SQLException{
        Statement st=conn.createStatement();
        ResultSet rs = st.executeQuery("SELECT APP.MATRICES.NAZEV, APP.MATRICES.X, APP.MATRICES.Y, APP.MATRICES.MATRIX FROM APP.MATRICES");
        ArrayList<String[]> al=new ArrayList<>();
        //int j=0;
        while (rs.next()) {
            String[] aux=new String[colNames.length];
            for (int i = 0; i < colNames.length; i++) {
                aux[i]=rs.getString(i+1);
            }
            al.add(aux);
        }
        for (int i = 0; i < al.size(); i++) {
            data.add(al.get(i));
        }
        st.close();
    }