/**
 * Created by loomisdf on 4/10/2016.
 */

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Main {

    static DatabaseFrame dbFrame;

    public static void main(String[] args) {
        dbFrame = new DatabaseFrame();
        // load the sqlite-JDBC driver using the current class loader
        try {
            Class.forName("org.sqlite.JDBC");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }

        Connection connection = null;
        try {
            // create a database connection
            connection = DriverManager.getConnection("jdbc:sqlite:data.db");
            Statement statement = connection.createStatement();
            statement.setQueryTimeout(30);  // set timeout to 30 sec.

            ResultSet rs = statement.executeQuery("SELECT * FROM GAME");
            while (rs.next()) {
                // read the result set
                System.out.println("Id = " + rs.getInt("id"));
                System.out.println("Title = " + rs.getString("name"));
                System.out.println("Price = " + rs.getInt("price"));
                System.out.println();
            }
        } catch (SQLException e) {
            // if the error message is "out of memory",
            // it probably means no database file is found
            System.err.println(e.getMessage());
        } finally {
            try {
                if (connection != null)
                    connection.close();
            } catch (SQLException e) {
                // connection close failed.
                System.err.println(e);
            }
        }
    }
}

@@ -43,152 +43,8 @@
 */%0A%0A
-import java.sql.Connection;%0Aimport java.sql.DriverManager;%0Aimport java.sql.ResultSet;%0Aimport java.sql.SQLException;%0Aimport java.sql.Statement;%0A%0A
 publ
@@ -410,584 +410,71 @@
     
-Connection connection = null;%0A        try %7B%0A            // create a database connection%0A            connection = DriverManager.getConnection(%22jdbc:sqlite:data.db%22);%0A            Statement statement = connection.createStatement();%0A            statement.setQueryTimeout(30);  // set timeout to 30 sec.%0A%0A            ResultSet rs = statement.executeQuery(%22SELECT * FROM GAME%22);%0A            while (rs.next()) %7B%0A                // read the result set%0A                System.out.println(%22Id = %22 + rs.getInt(%22id%22));%0A                System.out.println(%22Title = %22 + rs.getString(%22name%22))
+Game g = new Game();%0A        g.id = 1;%0A        g.name = %22Brink%22
 ;%0A  
@@ -483,582 +483,73 @@
     
- 
-       System.out.println(%22Price = %22 + rs.getInt(%22price%22));%0A                System.out.println();%0A            %7D%0A        %7D catch (SQLException e) %7B%0A            // if the error message is %22out of memory%22,%0A            // it probably means no database file is found%0A            System.err.println(e.getMessage());%0A        %7D finally %7B%0A            try %7B%0A                if (connection != null)%0A                    connection.close();%0A            %7D catch (SQLException e) %7B%0A                // connection close failed.%0A                System.err.println(e);%0A            %7D%0A        %7D
+g.price = (float)19.99;%0A%0A        System.out.println(g.reviews());
 %0A   

Update main to use models