private void list_framesMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_list_framesMousePressed
    current_hitbox=null;
    current_frame=null;
    hitbox_index_selected=-1;
    frame_index_selected=Integer.parseInt(""+list_frames.getSelectedIndex());
    //NodeList listOfMoves = hitboxes_doc.getElementsByTagName("Move");
    
    listOfMoves_hitboxes_file = hitboxes_doc.getElementsByTagName("Move");

    boolean frame_found=false;
    
    for(int s=0; s<listOfMoves_hitboxes_file.getLength() ; s++)//Move loop
    {
        Node move_node = listOfMoves_hitboxes_file.item(s);
        Element move_element = (Element)move_node;
        if(move_element.getAttribute("name").equals(list_moves.getSelectedValue()))
        {
            for(Node frame=move_element.getFirstChild();frame!=null;frame=frame.getNextSibling())//Frame loop
            {
                if(frame.getNodeName().equals("Frame"))
                {
                    String frame_number = "frame " + ((Element)frame).getAttribute("number");
                    if( frame_number.equals((String)list_frames.getSelectedValue()) )
                    {
                        current_frame = (Element) frame;
                        updateHitboxes(current_frame);
                        frame_found=true;
                    }
                }
            }
        }
    }
    if(!frame_found)
    {
        //Clear hitboxes list
        DefaultListModel clean_model = new DefaultListModel();
        list_red_hitboxes.setModel(clean_model);
        list_blue_hitboxes.setModel(clean_model);
        blue_hitboxes.clear();
        red_hitboxes.clear();
        printSprite();
    }
}//GEN-LAST:event_list_framesMousePressed