So, following the instructions in Lesson 9 I changed my CalculatorEngine to look like the following:
public class CalculatorEngine implements ActionListener
{
Calculator parent; // a reference to the Calculator
// Constructor stores the reference to the Calculator
// window in the member variable parent
CalculatorEngine(Calculator parent)
{
this.parent = parent;
}
...
But that in turn resulted in this:
// Add action listener
CalculatorEngine calcEngine = new CalculatorEngine();
button0.addActionListener(calcEngine);
...
CalculatorEngine now requires a value be passed to it. Can someone tell me what gets passed to this class now, I'm new and a bit confused.
Thanks.
