How can I link the command pattern to the button selected and the last checkbox selected?
<pre><code>Public Interface command{
    public void execute();
    {
    } 
    //this is the command interface 

    public class UndoCheckbox implements command{
        Undo undo;
        Public UndoCheckbox(Undo undo){
            this.undo=undo;
        }
        public void execute();
        //to execute
    }
}
</code></pre>
