How to remove things by index number

Hey all! I have this school assignment I’m nearly done, I need it done by midnight tonight EST. The problem I’m having is how do I convert clearly expressed strings (must originally be accepted as a string) then convert it to an integer based on the text? This program is designed to work with a GUI so it may not be super helpful to all
String item = removeArea.getText();

    for (int i=0; i<movieList.size(); i++)
    {
        
        if (item.equalsIgnoreCase(movieList.get(i)))
        {
            
            movieList.remove(item);
    
            favMovies = "";
           
        } else {
            outputArea.setText("Please input a movie title that is on the list");
             
        }
        
    }
    
    outputArea.setText(favMovies);
    removeArea.setText("");
    displayButton.setEnabled(true);
type or paste code here