SWI prolog working with GUI