I am a rookie in java. (About 6 months). I am creating my own projects to try and learn new areas of Java. I want to create a tic-tac-toe game. I know how to do it using JFrame, JPanel, JButtons (9 of them for o's and x's) with listeners set up for the buttons. Note: I would like to create an application and not an applet. I want to design it a different way for practice. All I want is a "Window" (I assume JFrame) with an area for displaying the x and o's when a user clicks on a certain area of the window. As I see the program, it would start and have a blank screen with just the # (large display on the screen). When the user clicks on a valid area (mouse click where an x or o would be located in reference to the #), an x or o would appear or the mouse click would be ignored if they clicked on an are that already had an x or o. I envision a JFrame with a JPanel with a GridLayout with 1 row x 1 column with a listener setup for the grid cell? I would then determine where in the grid cell the mouse was clicked. Am I on the right track or is there an easier way to go about it? Can you direct me with code snippets or functions/classes/methods to look at?
[This message has been edited by Scott Matthews (edited July 12, 2001).]