In line 64 the code tries to throw an Exception. It also does that in some other spots - what's the difference between line 64 and those other spots?
In line 71 you're calling 3 methods: Board.setCell, Cell.getRow and Cell.getColumn, and the compiler is not happy about that. Why might it not be happy?
You're still reusing class names from the Java API - JButton and BasicStroke. I'm not sure what redefining JButton is suppose to accomplish -did you mean to extend JButton instead?- but I'm 99% sure that you should just delete the BasicStroke class and use java.awt.BasicStroke instead.
I wonder why you have those private inner classes, in lines 30-46.
Class TicTacToeGUlGame (sounds like TicTacToeGUIGame spelled wrong), class Cell and class c. What are those for?
I suspect that you are using an IDE and that sometimes you spell a name wrong, and the IDE suggests to automatically correct the error for you by making a private inner class. Don't do that. Remove those inner classes.
In line 62, for example, you are creating a new instance of the inner class TicTacToeGUlGame (NOT your class TicTacToeGUIGame). I don't think that is what you really wanted to do in line 62.
About the error in line 64: You suddenly have a statement to throw an exception inside an anonymous inner class, but outside of any method. That is not correct. Statements must always be inside a method.
In your second code sample (class Cell), you have an inner class called JButton. As I already said in your previous question, don't create classes that have the same name as classes in Java's standard library. It will lead to very confusing errors, if you think you're using the standard JButton class, but in reality you're using your own JButton class.
You also have a class BasicStroke in line 39 of your second code sample. What is that for? Remove it, and import java.awt.BasicStroke instead, because that is what I think you intended to use.
I edited the 2 boards, I am still at a loss on what you are trying to tell me, but I am learning. Danny
Lost in the 60's
posted 6 years ago
Please don't edit your posts like that. Now all the previous posts make no sense any more, and neither you nor we can track the progress.
I agree with Jesper - I think your use of an IDE causes issues that make things much harder than they should be. The code now is a lot worse with all those inner classes. You've gotten rid of the BasicStroke class, but introduced several other classes that are even less helpful.
At this point my advice would be: power down the IDE, delete the code, and start from scratch using a basic code editor like Notepad++.