public boolean isIP(String s){
        // Make an ArrayList splitting the string up based off of . and :
        ArrayList<String> alist =
                new ArrayList<String>(Arrays.asList(s.split("[.:]+")));

        if(alist.size() != 5){ // If the string wasn't a long enough IP
            return false;
        }

        try{
            for(int i=0; i<alist.size(); i++){
                // Throws and error if it wasn't a number
                int n = Integer.parseInt(alist.get(i));
                // If the IP range is <0 or >255
                if((n < 0 || n > 255) && i != alist.size()-1){
                    return false;
                }
                // If the section is the last in the alist (the port)
                //   and is out of bounds
                if(i == alist.size()-1 && (n < 0 || n > 65535)){
                    return false;
                }
            }
        } catch(Exception ex){
            // Means the user put in letters not numbers
            return false;
        }

        return true;
    }