How would I make a GUI using Swing that picks two elements from a list and presents the user with two buttons so they could chose the winner?
问题 I am working with a list of elements that I want to rank. Ideally the program would randomly choose 2 elements to compare and present them, sort the list with the new ranking, then select 2 more so the user could pick the winner over and over again until the user wanted to stop. The parts I am having trouble with are: getting the button to interact with the object to change its rank and getting the JFrame to close and reopen with new elements to compare I created a class called action that is