posted 21 years ago
There is a CardLayout layout manager name clay and has been populated with 5 components whose identifiers are "A", "B", "C", "D", "E".
I don't know the order in which the components were added to the container.
I know, however, that the component with the identifier "B" is not the first component.
In such a case, how could I display the component that was added to the container prior to the one having the identifier of "B"?
I know there are 4 possible methods I could use
first(), last(), next(), and previous().
But how? How could I display the component that was added to the container prior to "B" if I don't know the order of the container?
I would appreciate your suggestion/advice/help.
Thanks in advance.