How to make a rectangle with mouse listeners and add them to JFrame?
问题 Basically, I want to make a rectangle that contains a mouse listener for my tic tac toe game. I intend to place them in between the lines to serve as mouse listeners. I have already set up a JFrame, all that is left is for me to add the rectangle. How would I go about doing this? Here is my code so far: public class TicTacToe extends JFrame{ public static void main(String[] args) { // TODO Auto-generated method stub new TicTacToe(); } public TicTacToe(){ //Sets up the frame this.setTitle("Tic