Waiting for a JFrame and then retrieving information from it
问题 First of all I'm new to Java and you'll probably be able to guess. Thanks in advance. I'm currently writing a board game using Java for an assignment. There are human and computer player classes, and the GUI only in the human player class. In the human class I use a class called 'UI' extending JFrame where the user selects a piece. At the moment this UI class waits for the enter button to be pressed then sets a 'done' variable to true. In the human player class I create this UI then wait in a