public PwdItem GetItem(int id) {
        PwdItem item = new PwdItem();

        if (this.connection == null) {
            return null;
        }

        try {
            Statement stmt = null;
            stmt = this.connection.createStatement();
            int count = 0;

            //find the max id
            ResultSet rs = stmt.executeQuery("SELECT * FROM PASSWD WHERE ID=" + id + ";");
            while (rs.next()) {
                item.setId(rs.getInt("ID"));
                item.setDomain(rs.getString("DOMAIN"));
                item.setUsername(rs.getString("USERNAME"));
                item.setPassword(rs.getString("PASSWORD"));
                item.setComment(rs.getString("COMMENT"));

                count++;
            }
            rs.close();
            stmt.close();

            //no item found
            if (count == 0) {
                return null;
            }
        } catch (SQLException e) {
            System.err.println(e.getClass().getName() + ": " + e.getMessage());
            System.exit(0);
        }

        return item;
    }