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

import javax.swing.JFrame;

import com.mysql.jdbc.Connection;
import com.mysql.jdbc.Statement;

public class Polaczenie{

	private final static String DBURL="jdbc:mysql://localhost:3306/magazyn";
	private final static String DBUSER = "root";
	private final static String DBPASS = "";
	private final static String DBDRIVER = "com.mysql.jdbc.Driver";
	
	private Connection connection;
	private Statement statement;
	
	public Polaczenie() throws SQLException{
		try {
			Class.forName(DBDRIVER);
			connection = (Connection) DriverManager.getConnection(DBURL, DBUSER, DBPASS);
			statement = (Statement) connection.createStatement();
		} catch (ClassNotFoundException e) {
			System.out.println("Problem ze sterownikiem ");
		} catch (SQLException e) {
			System.out.println("SQLException:" + e.getMessage());
			System.out.println("SQLSTATE:" + e.getSQLState());
			System.out.println("VendorError:"+e.getErrorCode());
		}
		
	}
	
	public ResultSet sqlSelect(String query) throws SQLException{
		return statement.executeQuery(query);
	}
	
}

@@ -1057,110 +1057,27 @@
 lic 
-ResultSet sqlSelect(String query) throws SQLException%7B%0D%0A%09%09return statement.executeQuery(query);
+void print()%7B
 %0D%0A%09
-%7D
 %0D%0A
-%09
+%7D
 %0D%0A%7D%0D

version test