base/common/src/main/com/thesett/common/swing/workpanel/WorkPanel.java
public void actionPerformed(ActionEvent event)
    {
        /*log.fine("void actionPerformed(ActionEvent): called");*/
        /*log.fine("Action is " + event.getActionCommand());*/

        // Check which action was performed
        String action = event.getActionCommand();

        if ("OK".equals(action))
        {
            // Check if the state is NOT_SAVED
            if (state.getState().equals(WorkPanelState.NOT_SAVED))
            {
                // Save the work
                saveWork();
            }
        }
        else if ("Cancel".equals(action))
        {
            // Check if the state is NOT_SAVED
            if (state.getState().equals(WorkPanelState.NOT_SAVED))
            {
                // Discard the work
                discardWork();
            }
        }
        else if ("Apply".equals(action))
        {
            // Check if the state is NOT_SAVED
            if (state.getState().equals(WorkPanelState.NOT_SAVED))
            {
                // Save the work
                saveWork();
            }
        }
    }
public void actionPerformed(ActionEvent event)
    {
        /*log.fine("void actionPerformed(ActionEvent): called");*/
        /*log.fine("Action is " + event.getActionCommand());*/

        // Check which action was performed
        String action = event.getActionCommand();

        if ("OK".equals(action))
        {
            // Check if the state is NOT_SAVED
            if (state.getState().equals(WorkPanelState.NOT_SAVED))
            {
                // Save the work
                saveWork();
            }
        }
        else if ("Cancel".equals(action))
        {
            // Check if the state is NOT_SAVED
            if (state.getState().equals(WorkPanelState.NOT_SAVED))
            {
                // Discard the work
                discardWork();
            }
        }
        else if ("Apply".equals(action))
        {
            // Check if the state is NOT_SAVED
            if (state.getState().equals(WorkPanelState.NOT_SAVED))
            {
                // Save the work
                saveWork();
            }
        }
    }
Listens for the button events Ok, Cancel and Apply. If the event is Ok or Apply the saveWork method is triggered.
If the event is Cancel then the discardWork method is triggered.

@param event The work panel event, ignored if it is not one of "Ok", "Cancel" or "Apply".