Ok, so the MouseListener doesn't work on Puzzle if one is on PuzzlePanel? That sucks... Ok, we will be a bit more inventive and do something a bit more "fun".
There are easier ways to do this, but...
Type: Posts; User: aussiemcgr
Ok, so the MouseListener doesn't work on Puzzle if one is on PuzzlePanel? That sucks... Ok, we will be a bit more inventive and do something a bit more "fun".
There are easier ways to do this, but...
Do me a favor:
Add a MouseListener to Puzzle, and print something out when mouseClicked(), to see if it picks it up.
If it does pick it up, we can listen to the mouse clicks from the Puzzle...
There is probably some fancy way of doing it, but the easiest way I can think of is to make the PuzzlePanels have a backwards reference to the Puzzle class (I assume each PuzzlePanel is only in one...