What I mean is, how to you design a user interface in which the screen changes with some action but the program operates entirely on one window? In other words, I suppose it'd be the same concept as navigating a website, for instance, in which everything happens on the same window (the web browser) but the screen contents change with every action (button click, link click, etc).
I looked at the Java API and found the CardLayout
class; am I heading in the right direction or is there a simpler way? (The page said CardLayout
is somewhat complicated and recommended for those willing to manually code everything).
I know there are the validate()
and repaint()
methods in JFrame
but this might not be the right use for them. I'm not quite a beginner anymore but not extremely experienced yet either, so bear with me.
Any guidance would be helpful. Thanks a lot.