Im using a progress Panel for a typing tutor. When the typing lesson ends I cannot do anything else with the Progress Panel e.g. resetting a lesson. Other less important buttons work e.g. changing the colour and font sizes etc.
The buttons are created by an action Listener. It all works perfect untill the lesson ends, and the progress panel freezes.
What is the correct way to call an action Listener method so that it will work when the lesson is completed?
You don't actually call an actionListener, what you do it you tell actionGenerators,
like the buttons, that your panel is willing to receive the actions they generate,
so your panel is set up as an actionListener (implements it)
and 'hooks up' to the button like:
This tells the button that your panel is an actionslistener that listens with the method actionPerformed(ActionEvent, a)
So normally you never write code in your program that invokes this method, - it is
called by the buttons, comboboxes etc. when the user does something with them.
But you can easily do a 'button click' programmatically like:
So, telling what is wrong with your code is impossible as you have used the callback
method (actionPerformed) to set some components and vars, not how the progress
panel ticks, and that is where the problem exists.