This question might be relevant to this: java – How would I dynamically add swing component to gui on click?
But would it be possible to make the changes you did during runtime be permanent and see it again when you rerun the application?
I have some blurry ideas at the back of my mind but can you give me some suggestions on how this could work?
This has little to do with Swing per se and all to do with persistence: What you are trying to do is set the state of an object (or group of objects) and have it persist when the program exits. There are several ways to do this including serialization, XML serialization (which I favor) using XML beans or JAXB, or properties. I suggest checking out JAXB and persisting your class’s state with this by marshalling and unmarshalling the state to XML. Otherwise if you have a lot of information that must persist, then consider using a database.