hello there, i have a large jtree on the left, and a mainpanel with a cardlayout on the right. with every node selection, the mainpanel switches to the corresponding card. now i want to provide some browser like histoy back and forward functionality. Does anybody have a nice solution for this ?
Best Regards, Rick
posted 9 years ago
Of course. You could make up a helper class that will remember a certain number of node selections and/or card indices in an array. When you want to back up just start moving back through the array (or other data structure) for the old selections. Or you can find an old selection by index into the array.