public void listItinerary() {
        try {
            Class.forName("com.mysql.jdbc.Driver");
        } catch (ClassNotFoundException e) {
            System.out.println("Where is your MySQL JDBC Driver?");
            e.printStackTrace();

        }
        PreparedStatement ps = null;
        Connection con = null;
        ResultSet rs;
        try {

            con = DriverManager.getConnection("jdbc:mysql://mysql2.cs.stonybrook.edu:3306/mlavina", "mlavina", "108262940");
            if (con != null) {
                con.setAutoCommit(false);
                try {
                    String sql = "SELECT DISTINCT I.ResrNo, I.AirlineID, I.FlightNo, \n"
                            + "DA.Name AS Departing, AA.Name AS Arriving, \n"
                            + "L.DepTime, L.ArrTime \n"
                            + "FROM Includes I, Leg L, Airport DA, Airport AA \n"
                            + "WHERE I.AirlineID = L.AirlineID AND I.FlightNo = L.FlightNo \n"
                            + "AND L.DepAirportID = DA.Id AND L.ArrAirportID = AA.Id \n"
                            + "AND I.ResrNo = ?";
                    ps = con.prepareStatement(sql);
                    ps.setInt(1, selectedReservation.resrNo);
                    ps.execute();

                    rs = ps.getResultSet();
                    itinerary.removeAll(itinerary);
                    while (rs.next()) {
                        itinerary.add(new Itinerary(rs.getInt("ResrNo"), rs.getString("AirlineID"), rs.getInt("FlightNo"), rs.getString("Departing"), rs.getString("Arriving"),
                                rs.getTimestamp("DepTime"), rs.getTimestamp("ArrTime")));
                    }
                    con.commit();
                } catch (Exception e) {
                    con.rollback();
                }
            }

        } catch (Exception e) {
            System.out.println(e);
        } finally {
            try {
                con.setAutoCommit(true);
                con.close();
                ps.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }