I have an application that uses panels to display data. This can grow into thousands of panels all of the same type. I've been looking into using the flyweight design
pattern to lower system resources and make the application faster all around. Can you use the flyweight pattern with JPanels? I've been attempting to do so but haven't had any luck thus far. I've created the factory which works but it only displays the 1 panel which happens to be the last in the list created. Below are some of the requirements I need
1. Each panel has the same appearance
2. Each panel has a different question object attached which holds information about what to display inside the panel
3. Each panel has icons being displayed based on conditions being passed.
What would be my best route for this type of situation? Thanks for the help.