 <p>The function you have, despite being called <code>ButtonConstructor</code>, is not a constructor.</p> <p>In Java, a constructor must share the name of its parent class (and have no return type). The correct signature would be <code>public TicTacToePanel()</code>.</p> <p>I cannot say for sure without seeing a more complete view of your code (you have surely omitted most of it), but it is likely that you are not calling the function with which you provided us at all, but rather using the implied no-argument constructor. Try renaming the function to the signature I gave above.</p>