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

    boolean frame_found=false;
    
    for(int s=0; s<listOfMoves_sprites_file.getLength() ; s++)//Move loop
    {
        Node move_node = listOfMoves_sprites_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("Sprite"))
                {
                    String frame_number = "frame " + ((Element)frame).getAttribute("frame_number");
                    if( frame_number.equals((String)list_frames.getSelectedValue()) )
                    {
                        current_sprite=(Element) frame;
                        
                        int align_x=Integer.parseInt( current_sprite.getAttribute("align_x") );
                        int align_y=Integer.parseInt( current_sprite.getAttribute("align_y") );
                        
                        spinner_x.setValue(align_x);
                        spinner_y.setValue(align_y);
                        //updateSprites(current_sprite);
                        frame_found=true;
                    }
                }
            }
        }
    }
    printSprite();
}//GEN-LAST:event_list_framesMousePressed