I'm working on a school project. It's basically a small program that will help people choose best smartphone according to their preferences.
It'll be like, every page will ask a question, then user clicks next and it proceeds to next page.
What would be the best approach for it? I don't want too much code crammed into one file. So I'm thinking -
JFrame
usingCardLayout
.- A separate
JPanel
for each page.
But I'll want to keep all panels in separate files of their own. Will that be a good idea? If yes, how should I approach going forward in pages? setVisible(true/false)
in ActionListener
?
Apologies for the noob question, I'm super new to Java and learning on my own.