Im building a math testing program for class. A user enters a username, the number of problems, and the number of digits. The program spits out a problem and the user answers in a textfield on that page.
Is there a way to make a default page that loads different JPanels based on a button action? Additionaly, Can you store Jpanels in an arrayList and store the inputs?
ArrayList <JPanel> arrList = new ArrayList<>();
for(int i = 0; actionListener == true ; i++){
default_JFrame().add(arrList.get(i));
}
Are there any general best practices for Java Swing?