--- edited as the question is updated ---
btnClear.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { model.resetComponents(); model.repaint(); } });
contains an anonymous class extended from ActionListener
You need this code to read something like
btnClear.addActionListener(new MyInnerClass());
If you do this with everything that works 100%, I would say that you did it!
--- The original message follows --- The question is worded in such a way that I could understand it; but I'm not sure.
One hint is that he asked for an inner class. This means that the solution expects you to write an inner class:
public class ControlsPanel extends Panel implements Resettable {
Please note: if you find an abstract class (or interface) that is created in your code by specifying the missing functions in the initializer block, you probably found an βanonymousβ class. This means that your inner class must extend this particular class, and you must redo the problem to use your inner class instead of the anonymous construct.
As usual, the main problem is to understand the question, once this is done, the rest just works.
source share