I have a current Form(previousForm) with a previousForm as a parameter. My goal is to get a specific Command of this previousForm (reload the data of the previousForm and then do showBack()) from the current Form. The problem is that I can't reach this specific Command from my current form. While doing research on this problem, I found getCommand(int index) method, and I would like to clarify how it works.
The documentation of Form says that it
Returns the command occupying the given index
How can I find the index of my Command? Or how can I set it?
I see there is a Command's constructor Command(String command, int id) , however this id is not the index.