Hello,
I have a program with a gui and a different class named Search with a static method named paging().
This paging method retrieves some results and shows them using pagination,
so, it prints first e.x 10 results and then asks the user if he wants to continue to the next page, previous, quit or jump to a page.
I have buttons for previous, next page etc. on the gui, so I want the paging() method to wait until the user clicks a button.
What is the right way to do this?