i'm trying write program has several navigation buttons, example classical "back" , "forward" buttons. need way let user navigate through different pages (jpanel
s, true). how can that? or better, how real programmer (i'm beginner jet) that? i'm using moment cardlayout
, thought store "path" user , use previous() , next() methods cardlayout
provides. solution? bit "dummy"? kind of "navigation pattern" exist?
you may store created jpanels in list or stack long keep internal states unchanged other jpanels. might little resources hungry, thats why better store internal state of object rather whole object.
take @ memento pattern:
Comments
Post a Comment