public TableFromDatabase() {
        Vector columnNames = new Vector();
        Vector data = new Vector();
        final Class referenceClass = Main.class;
        final URL url = referenceClass.getProtectionDomain().getCodeSource().getLocation();
        try
        {
            //  Connect to an Access Database
            String driver = "org.relique.jdbc.csv.CsvDriver";
            final File jarPath = new File(url.toURI()).getParentFile();
            Class.forName( driver );
            Connection connection = DriverManager.getConnection("jdbc:relique:csv:"+jarPath);
            //  Get data from table
            String sql = "Select * from db";
            Statement stmt = connection.createStatement();
            ResultSet rs = stmt.executeQuery( sql );
            ResultSetMetaData md = rs.getMetaData();
            int columns = md.getColumnCount();
            //  Get column names
            for (int i = 1; i <= columns; i++)
            {
                columnNames.addElement( md.getColumnName(i) );
            }
            //  Get row data
            while (rs.next())
            {
                Vector row = new Vector(columns);

                for (int i = 1; i <= columns; i++)
                {
                    row.addElement( rs.getObject(i) );
                }
                data.addElement( row );
            }
            rs.close();
            stmt.close();
            connection.close();
        }
        catch(URISyntaxException | ClassNotFoundException | SQLException e)
        {
            System.out.println( e );
        }
        //  Create table with database data

        JTable table = new JTable(data, columnNames)
        {
            @Override
            public Class getColumnClass(int column)
            {
                for (int row = 0; row < getRowCount(); row++)
                {
                    Object o = getValueAt(row, column);

                    if (o != null)
                    {
                        return o.getClass();
                    }
                }
                return Object.class;
            }
        };
        table.setEnabled(false);
        JScrollPane scrollPane = new JScrollPane( table );
        getContentPane().add( scrollPane );

        JPanel buttonPanel = new JPanel();
        getContentPane().add( buttonPanel, BorderLayout.SOUTH );
        
    }