Hello.
I'm trying to create simple swing application by using MVC
pattern. I had it all figured out until stumbled upon problem where I had to add another panels dynamically on runtime.
I've created frame where I applied BoxLayout aligned to Y-axis. In that layout I have two different panels. First one of them I use to collect data from 2 JTextfields and second one to display something else in JTable.
Now let's say that until certain condition is met every time when user submits (click's the button) I add dynamically another JPanel identical to the first one except the button.
So far I have defined components private and used getter/setters in Controller class and it makes everything even more confusing.
What I can't figure out is how I dynamically add another JPanels and still be able to access those JTextfield values.
Thank you.