I\'m attempting to write a java program that initializes certain layouts based on what the user selects. What I want to do is try to avoid writing a bunch of if-statements s
You should use a framework to avoid if's to create o define behavior.
Spring lets us to manage and solve this issue. It uses a factory pattern and more design patterns. So using annotations or xml configuration file you can decide what classes create. PD: Of course, I'm 100% secure that spring uses if's. But it's proved and used in many strong and reliable apps.