0

I have a TicTacToe board and I need to draw a line through the X's or O's when someone wins. I know how to use the paint method, repaint, etc (as far as how they're called & the basics). I'm just not sure how to go about actually drawing the line. I assume its by repeatedly calling repaint, but I'm unsure about the rest of the logic to actually get the line to run through the squares of the board. One way (I guess) would be to repeatedly give the method coordinates, and "dot" each coordinate until it formed a line. But I think that would be overkill . . & it would be pretty hard to get the coordinates that run through the middle of the JButtons anyway.