@@ -0,0 +1,1253 @@
+package ingsw;%0D%0A/*%0D%0A * To change this license header, choose License Headers in Project Properties.%0D%0A * To change this template file, choose Tools %7C Templates%0D%0A * and open the template in the editor.%0D%0A */%0D%0Aimport java.sql.*;%0D%0Aimport javax.swing.JOptionPane;%0D%0A/**%0D%0A *%0D%0A * @author Damiano%0D%0A */%0D%0Apublic class Connessione %7B%0D%0A    private static Connection conn;%0D%0A    public static void setConnection()%7B%0D%0A        try%7B%0D%0A            conn=DriverManager.getConnection(%22jdbc:%22, %22%22,%22%22);%0D%0A            conn.setAutoCommit(false);%0D%0A        %7Dcatch(SQLException e)%7B%0D%0A            JOptionPane.showMessageDialog(null,e.getMessage(),%22connessione%22,JOptionPane.ERROR_MESSAGE);%0D%0A        %7D%0D%0A    %7D%0D%0A    public static Connection getConn()%7B%0D%0A        return conn;%0D%0A    %7D%0D%0A    public static void chiudi(ResultSet rs,PreparedStatement st)%7B%0D%0A        try%7B%0D%0A            if(rs!=null)%0D%0A                 rs.close();%0D%0A            if(st!=null)%0D%0A                 st.close();%0D%0A        %7Dcatch(SQLException e)%7B%0D%0A            %0D%0A        %7D%0D%0A    %7D%0D%0A    public static void chiudi(ResultSet rs,Statement st)%7B%0D%0A        try%7B%0D%0A            if(rs!=null)%0D%0A                 rs.close();%0D%0A            if(st!=null)%0D%0A                 st.close();%0D%0A        %7Dcatch(SQLException e)%7B%0D%0A            %0D%0A        %7D%0D%0A    %7D%0D%0A%7D%0D%0A

add Connessione.java